summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-04-14 20:31:13 +0000
committerOthmar Gsenger <otti@anytun.org>2009-04-14 20:31:13 +0000
commit6a55013b56615450adc159f9e610d16a90e2077e (patch)
treec3a710243437fa4f5834c81a9fd082b7d08c79de
parentallow empty endpoint for config (diff)
kd-prf null bug fix by equinox
-rw-r--r--src/options.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/options.cpp b/src/options.cpp
index cf583c1..b77ab41 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -208,7 +208,7 @@ Options::Options() : key_(u_int32_t(0)), salt_(u_int32_t(0))
cipher_ = "null";
auth_algo_ = "null";
auth_tag_length_ = 0;
- kd_prf_ = "null";
+ kd_prf_ = "aes-ctr";
#endif
role_ = ROLE_LEFT;
}
@@ -477,15 +477,12 @@ void Options::parse_post()
#if defined(ANYTUN_OPTIONS)
if(cluster_opts && connection_opts)
cLog.msg(Log::PRIO_WARNING) << "you have provided options for cluster support as well as connection oriented options, we strongly recommend to use anytun-config and anytun-controld when building a cluster";
-#endif
-
+
if(cipher_ == "null" && auth_algo_ == "null")
kd_prf_ = "null";
if((cipher_ != "null" || auth_algo_ != "null") && kd_prf_ == "null")
cLog.msg(Log::PRIO_WARNING) << "using NULL key derivation with encryption and or authentication enabled!";
-
-#if defined(ANYTUN_OPTIONS)
u_int32_t tag_len_max = AuthAlgoFactory::getDigestLength(auth_algo_);
if(!tag_len_max) auth_tag_length_ = 0;
else if(tag_len_max < auth_tag_length_) {