summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-04-30 23:15:04 +0000
committerdjm <djm@openbsd.org>2017-04-30 23:15:04 +0000
commit76745bed426e9df44bd9ddcc7c5d7d5c29b538b5 (patch)
tree2e3929ea5b570ad7ad30b64eef75f54418561f95 /usr.bin/ssh/ssh.c
parentremove compat20/compat13/compat15 variables (diff)
downloadwireguard-openbsd-76745bed426e9df44bd9ddcc7c5d7d5c29b538b5.tar.xz
wireguard-openbsd-76745bed426e9df44bd9ddcc7c5d7d5c29b538b5.zip
remove SSHv1 ciphers; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 94492e9bb03..059ec406fc1 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.455 2017/04/30 23:13:25 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.456 2017/04/30 23:15:04 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -782,27 +782,14 @@ main(int ac, char **av)
}
break;
case 'c':
- if (ciphers_valid(*optarg == '+' ?
+ if (!ciphers_valid(*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",
optarg);
exit(255);
}
- if (options.cipher == SSH_CIPHER_3DES)
- options.ciphers = xstrdup("3des-cbc");
- else if (options.cipher == SSH_CIPHER_BLOWFISH)
- options.ciphers = xstrdup("blowfish-cbc");
- else
- options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT);
+ free(options.ciphers);
+ options.ciphers = xstrdup(optarg);
break;
case 'm':
if (mac_valid(optarg)) {