From ad0cd81faf06c83b4e723b3d621e051756460bdd Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 24 Feb 2008 00:58:19 +0000 Subject: changed cipher option default value to aes-ctr added option for key derivation, default is aes-ctr --- options.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp index 4803cd2..461e4f6 100644 --- a/options.cpp +++ b/options.cpp @@ -103,7 +103,8 @@ Options::Options() ifconfig_param_local_ = "192.168.200.1"; ifconfig_param_remote_netmask_ = "255.255.255.0"; seq_window_size_ = 100; - cipher_ = "aes"; + cipher_ = "aes-ctr"; + kd_prf_ = "aes-ctr"; auth_algo_ = "sha1"; } @@ -134,6 +135,7 @@ bool Options::parse(int argc, char* argv[]) PARSE_SCALAR_PARAM2("-n","--ifconfig", ifconfig_param_local_, ifconfig_param_remote_netmask_) PARSE_SCALAR_PARAM("-w","--window-size", seq_window_size_) PARSE_SCALAR_PARAM("-c","--cipher", cipher_) + PARSE_SCALAR_PARAM("-k","--kd-prf", kd_prf_) PARSE_SCALAR_PARAM("-a","--auth-algo", auth_algo_) PARSE_SCALAR_CSLIST("-M","--sync-hosts", host_port_queue) else @@ -405,6 +407,19 @@ Options& Options::setCipher(std::string c) return *this; } +std::string Options::getKdPrf() +{ + Lock lock(mutex); + return kd_prf_; +} + +Options& Options::setKdPrf(std::string k) +{ + Lock lock(mutex); + kd_prf_ = k; + return *this; +} + std::string Options::getAuthAlgo() { Lock lock(mutex); -- cgit v1.2.3