summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-06-22 15:27:40 +0000
committerErwin Nindl <nine@wirdorange.org>2007-06-22 15:27:40 +0000
commit8ed8d6c21dffcb4202fdd592138f15cbc80355ea (patch)
tree0092058aba6de10350f5c33835084c964e5832f4
parentadded libsrtp to svn (diff)
added srtp/crypto/*.o to makefile
-rw-r--r--Makefile22
-rw-r--r--cypher.cpp13
-rw-r--r--cypher.h7
3 files changed, 39 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8ed60d9..5118fa4 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,25 @@ OPENVPNDEPS = openvpn/tun.o \
openvpn/shaper.o \
openvpn/fragment.o
+SRTPDEPS = srtp/crypto/cipher/aes_cbc.o \
+ srtp/crypto/cipher/aes_icm.o \
+ srtp/crypto/cipher/aes.o \
+ srtp/crypto/cipher/cipher.o \
+ srtp/crypto/cipher/null_cipher.o \
+ srtp/crypto/kernel/alloc.o \
+ srtp/crypto/kernel/crypto_kernel.o \
+ srtp/crypto/kernel/err.o \
+ srtp/crypto/kernel/key.o \
+ srtp/crypto/math/datatypes.o \
+ srtp/crypto/math/stat.o \
+ srtp/crypto/hash/auth.o \
+ srtp/crypto/hash/hmac.o \
+ srtp/crypto/hash/null_auth.o \
+ srtp/crypto/hash/sha1.o \
+ srtp/crypto/rng/ctr_prng.o \
+ srtp/crypto/rng/prng.o \
+ srtp/crypto/rng/rand_source.o
+
OBJS = anytun.o \
tunDevice.o \
packetSource.o \
@@ -41,7 +60,8 @@ OBJS = anytun.o \
log.o \
options.o \
seqWindow.o \
- $(OPENVPNDEPS)
+ $(OPENVPNDEPS) \
+ $(SRTPDEPS)
EXECUTABLE = anytun
diff --git a/cypher.cpp b/cypher.cpp
index 58b433f..909b229 100644
--- a/cypher.cpp
+++ b/cypher.cpp
@@ -34,6 +34,10 @@
#include "cypher.h"
+extern "C" {
+#include "srtp/crypto/include/cipher.h"
+}
+
void Cypher::cypher(Buffer& buf)
{
Buffer stream = getBitStream(buf.getLength());
@@ -57,4 +61,11 @@ Buffer NullCypher::getBitStream(u_int32_t length)
buf[i] = 0;
return buf;
}
-
+
+Buffer AesIcmCypher::getBitStream(u_int32_t length)
+{
+ Buffer buf(length);
+ return buf;
+}
+
+
diff --git a/cypher.h b/cypher.h
index a225ebd..8baa9cb 100644
--- a/cypher.h
+++ b/cypher.h
@@ -33,7 +33,6 @@
#include "buffer.h"
-// this is a svn test comment
class Cypher
{
@@ -54,4 +53,10 @@ protected:
Buffer getBitStream(u_int32_t length);
};
+class AesIcmCypher : public Cypher
+{
+protected:
+ Buffer getBitStream(u_int32_t length);
+};
+
#endif