diff options
author | Christian Pointner <equinox@anytun.org> | 2008-02-24 00:58:19 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-02-24 00:58:19 +0000 |
commit | ad0cd81faf06c83b4e723b3d621e051756460bdd (patch) | |
tree | b3bf42694839cfe7e5cb46ea7d1978306b2b2f18 /options.cpp | |
parent | default for key_derivation_rate now 1 (diff) |
changed cipher option default value to aes-ctr
added option for key derivation, default is aes-ctr
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
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); |