diff options
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 44d2b24..140b0cf 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -86,6 +86,10 @@ static void printhelp() { #ifdef ENABLE_CLI_PROXYCMD "-J <proxy_program> Use program pipe rather than TCP connection\n" #endif +#ifdef ENABLE_USER_ALGO_LIST + "-c <cipher list> Specify preferred ciphers ('-c help' to list options)\n" + "-m <MAC list> Specify preferred MACs for packet verification (or '-m help')\n" +#endif #ifdef DEBUG_TRACE "-v verbose (compiled with DEBUG_TRACE)\n" #endif @@ -149,6 +153,10 @@ void cli_getopts(int argc, char ** argv) { #ifndef DISABLE_ZLIB opts.enable_compress = 1; #endif +#ifdef ENABLE_USER_ALGO_LIST + opts.cipher_list = NULL; + opts.mac_list = NULL; +#endif /* not yet opts.ipv4 = 1; opts.ipv6 = 1; @@ -283,6 +291,14 @@ void cli_getopts(int argc, char ** argv) { cli_opts.agent_fwd = 1; break; #endif +#ifdef ENABLE_USER_ALGO_LIST + case 'c': + next = &opts.cipher_list; + break; + case 'm': + next = &opts.mac_list; + break; +#endif #ifdef DEBUG_TRACE case 'v': debug_trace = 1; @@ -290,8 +306,10 @@ void cli_getopts(int argc, char ** argv) { #endif case 'F': case 'e': +#ifndef ENABLE_USER_ALGO_LIST case 'c': case 'm': +#endif case 'D': #ifndef ENABLE_CLI_REMOTETCPFWD case 'R': @@ -351,6 +369,10 @@ void cli_getopts(int argc, char ** argv) { /* And now a few sanity checks and setup */ +#ifdef ENABLE_USER_ALGO_LIST + parse_ciphers_macs(); +#endif + if (host_arg == NULL) { printhelp(); exit(EXIT_FAILURE); |