summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-20 09:54:46 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-20 09:54:46 +0000
commit65f17cffdaabd3d3793b82fa55e0fde9ec93c84c (patch)
tree1c63ea742e7a142bff6fa9b62f9c08422fafa181 /src
parentfixed bug which prevents uanytun from detecting device type properly (diff)
switching key derivation prf to null if no auth or no enc
Diffstat (limited to 'src')
-rw-r--r--src/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 4b8dc33..8876017 100644
--- a/src/options.c
+++ b/src/options.c
@@ -211,6 +211,12 @@ int options_parse(options_t* opt, int argc, char* argv[])
}
#ifndef NO_CRYPT
+ if(!strcmp(opt->cipher_, "null") && !strcmp(opt->auth_algo_, "null") &&
+ strcmp(opt->kd_prf_, "null")) {
+ if(opt->kd_prf_)
+ free(opt->kd_prf_);
+ opt->kd_prf_ = strdup("null");
+ }
if((strcmp(opt->cipher_, "null") || strcmp(opt->auth_algo_, "null")) &&
!strcmp(opt->kd_prf_, "null")) {
log_printf(WARNING, "using NULL key derivation with encryption and or authentication enabled!");