From 65f17cffdaabd3d3793b82fa55e0fde9ec93c84c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 20 Jan 2009 09:54:46 +0000 Subject: switching key derivation prf to null if no auth or no enc --- src/options.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/options.c') 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!"); -- cgit v1.2.3