diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-20 09:54:46 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-20 09:54:46 +0000 |
commit | 65f17cffdaabd3d3793b82fa55e0fde9ec93c84c (patch) | |
tree | 1c63ea742e7a142bff6fa9b62f9c08422fafa181 /src/options.c | |
parent | fixed 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/options.c')
-rw-r--r-- | src/options.c | 6 |
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!"); |