version 1.455, 2017/04/30 23:13:25 |
version 1.456, 2017/04/30 23:15:04 |
|
|
} |
} |
break; |
break; |
case 'c': |
case 'c': |
if (ciphers_valid(*optarg == '+' ? |
if (!ciphers_valid(*optarg == '+' ? |
optarg + 1 : optarg)) { |
optarg + 1 : optarg)) { |
/* SSH2 only */ |
|
free(options.ciphers); |
|
options.ciphers = xstrdup(optarg); |
|
options.cipher = SSH_CIPHER_INVALID; |
|
break; |
|
} |
|
/* SSH1 only */ |
|
options.cipher = cipher_number(optarg); |
|
if (options.cipher == -1) { |
|
fprintf(stderr, "Unknown cipher type '%s'\n", |
fprintf(stderr, "Unknown cipher type '%s'\n", |
optarg); |
optarg); |
exit(255); |
exit(255); |
} |
} |
if (options.cipher == SSH_CIPHER_3DES) |
free(options.ciphers); |
options.ciphers = xstrdup("3des-cbc"); |
options.ciphers = xstrdup(optarg); |
else if (options.cipher == SSH_CIPHER_BLOWFISH) |
|
options.ciphers = xstrdup("blowfish-cbc"); |
|
else |
|
options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT); |
|
break; |
break; |
case 'm': |
case 'm': |
if (mac_valid(optarg)) { |
if (mac_valid(optarg)) { |