From 2f9b0dc4a80923c663c44d7af2f0311d225f0949 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 27 Feb 2008 22:24:52 +0000 Subject: added command line parameter for master key and salt --- anytun.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'anytun.cpp') diff --git a/anytun.cpp b/anytun.cpp index 721c527..c1181f1 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -77,21 +77,10 @@ void createConnection(const std::string & remote_host, u_int16_t remote_port, ConnectionList & cl, u_int16_t seqSize, SyncQueue & queue, mux_t mux) { - // TODO: use key exchange for master key/salt - uint8_t key[] = { - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', - 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p' - }; - - uint8_t salt[] = { - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', - 'i', 'j', 'k', 'l', 'm', 'n' - }; - SeqWindow * seq= new SeqWindow(seqSize); seq_nr_t seq_nr_=0; KeyDerivation * kd = KeyDerivationFactory::create(gOpt.getKdPrf()); - kd->init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt))); + kd->init(gOpt.getKey(), gOpt.getSalt()); cLog.msg(Log::PRIO_NOTICE) << "added connection remote host " << remote_host << ":" << remote_port; ConnectionParam connparam ( (*kd), (*seq), seq_nr_, remote_host, remote_port); cl.addConnection(connparam,mux); @@ -339,22 +328,6 @@ bool initLibGCrypt() int main(int argc, char* argv[]) { -/* - - char INPUT[] = "101232565621f6e77f56"; - - std::string input(INPUT, sizeof(INPUT)); - - Buffer b(input); - - std::cout << " b:" << b.getHexDump() << std::endl; - - - - - exit(0); -*/ - std::cout << "anytun - secure anycast tunneling protocol" << std::endl; if(!gOpt.parse(argc, argv)) { -- cgit v1.2.3