diff options
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | cypher.cpp | 13 | ||||
-rw-r--r-- | cypher.h | 7 |
3 files changed, 39 insertions, 3 deletions
@@ -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 @@ -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; +} + + @@ -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 |