summaryrefslogtreecommitdiff
path: root/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2007-12-09 11:54:13 +0000
committerOthmar Gsenger <otti@anytun.org>2007-12-09 11:54:13 +0000
commit24506d737a7a025ae930e1481fc02e812328690e (patch)
tree3cfe7d5850d7c5bd1e633293f6ffe996c4cac12d /anytun.cpp
parentreadme updated (diff)
no call to keyderivation
Diffstat (limited to 'anytun.cpp')
-rw-r--r--anytun.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/anytun.cpp b/anytun.cpp
index 3bf24f9..a3797d9 100644
--- a/anytun.cpp
+++ b/anytun.cpp
@@ -76,7 +76,7 @@ void createConnection(const std::string & remote_host , u_int16_t remote_port, C
KeyDerivation kd;
- kd.init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt)));
+ //kd.init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt)));
std::cout << "anytun.cpp: crateConnection called" << std::endl;
ConnectionParam connparam ( kd, seq, remote_host, remote_port);
cl.addConnection(connparam,std::string("default"));
@@ -112,8 +112,9 @@ void* sender(void* p)
// cypher the packet
Buffer tmp_key(16), tmp_salt(14);
- conn.kd_.generate(label_satp_encryption, seq, tmp_key, tmp_key.getLength());
- conn.kd_.generate(label_satp_salt, seq, tmp_salt, tmp_salt.getLength());
+ //TODO fix key derivation!
+ //conn.kd_.generate(label_satp_encryption, seq, tmp_key, tmp_key.getLength());
+ //conn.kd_.generate(label_satp_salt, seq, tmp_salt, tmp_salt.getLength());
c.setKey(tmp_key);
c.setSalt(tmp_salt);
@@ -193,8 +194,8 @@ void* receiver(void* p)
// decypher the packet
Buffer tmp_key(16), tmp_salt(14);
- conn.kd_.generate(label_satp_encryption, seq, tmp_key, tmp_key.getLength());
- conn.kd_.generate(label_satp_salt, seq, tmp_salt, tmp_salt.getLength());
+ //conn.kd_.generate(label_satp_encryption, seq, tmp_key, tmp_key.getLength());
+ //conn.kd_.generate(label_satp_salt, seq, tmp_salt, tmp_salt.getLength());
c.setKey(tmp_key);
c.setSalt(tmp_salt);
c.cypher(pack, seq, sid);