|
|
@ -340,8 +340,6 @@ static int setOption(int optkey, char *optargument, n2n_priv_config_t *ec, n2n_e |
|
|
|
case 'k': /* encrypt key */ |
|
|
|
{ |
|
|
|
if(conf->encrypt_key) free(conf->encrypt_key); |
|
|
|
if(conf->transop_id == N2N_TRANSFORM_ID_NULL) |
|
|
|
conf->transop_id = N2N_TRANSFORM_ID_TWOFISH; |
|
|
|
conf->encrypt_key = strdup(optargument); |
|
|
|
traceEvent(TRACE_DEBUG, "encrypt_key = '%s'\n", conf->encrypt_key); |
|
|
|
break; |
|
|
@ -835,6 +833,14 @@ int main(int argc, char* argv[]) { |
|
|
|
rc = -1; |
|
|
|
#endif |
|
|
|
|
|
|
|
if(conf.transop_id == N2N_TRANSFORM_ID_NULL) { |
|
|
|
if(conf.encrypt_key) { |
|
|
|
traceEvent(TRACE_WARNING, "Ignoring -k as -A1 was set"); |
|
|
|
free(conf.encrypt_key); |
|
|
|
conf.encrypt_key = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(rc < 0) |
|
|
|
help(); |
|
|
|
|
|
|
|