summaryrefslogtreecommitdiff
path: root/connectionList.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-25 00:05:37 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-25 00:05:37 +0000
commit2205b2fbf6f29d9d7fec8d245d51c0ccd75d2a7f (patch)
treee32ab0b36d848f4454a9e22871ba0b446fc6cc7f /connectionList.cpp
parentsorry forgot to add keyDerivatioFactory (diff)
options is global now
kd_prf_ is set to null if cipher_ is null as well
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 713009b..f3bb129 100644
--- a/connectionList.cpp
+++ b/connectionList.cpp
@@ -31,6 +31,7 @@
#include "threadUtils.hpp"
#include "datatypes.h"
#include "keyDerivationFactory.h"
+#include "options.h"
#include "connectionList.h"
@@ -92,7 +93,7 @@ ConnectionParam & ConnectionList::getOrNewConnectionUnlocked(u_int16_t mux)
SeqWindow * seq= new SeqWindow(0);
seq_nr_t seq_nr_=0;
- KeyDerivation * kd = KeyDerivationFactory::create("aes-ctr"); // TODO: get value from options
+ KeyDerivation * kd = KeyDerivationFactory::create(gOpt.getKdPrf());
kd->init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt)));
ConnectionParam conn ( (*kd), (*seq), seq_nr_, "", 0);
connections_.insert(ConnectionMap::value_type(mux, conn));