summaryrefslogtreecommitdiff
path: root/connectionList.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-24 19:10:34 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-24 19:10:34 +0000
commitc597afc9f59af4d4596068d042f467127311bfed (patch)
treec08334c099c0608c2368c1978f1c9150abfc094d /connectionList.cpp
parentchanged cipher option default value to aes-ctr (diff)
added NullKeyDerivation
added KeyDerivationFactory
Diffstat (limited to 'connectionList.cpp')
-rw-r--r--connectionList.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/connectionList.cpp b/connectionList.cpp
index 93a23b9..713009b 100644
--- a/connectionList.cpp
+++ b/connectionList.cpp
@@ -30,6 +30,7 @@
#include "threadUtils.hpp"
#include "datatypes.h"
+#include "keyDerivationFactory.h"
#include "connectionList.h"
@@ -91,7 +92,7 @@ ConnectionParam & ConnectionList::getOrNewConnectionUnlocked(u_int16_t mux)
SeqWindow * seq= new SeqWindow(0);
seq_nr_t seq_nr_=0;
- KeyDerivation * kd = new KeyDerivation;
+ KeyDerivation * kd = KeyDerivationFactory::create("aes-ctr"); // TODO: get value from options
kd->init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt)));
ConnectionParam conn ( (*kd), (*seq), seq_nr_, "", 0);
connections_.insert(ConnectionMap::value_type(mux, conn));