summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-04-30 23:15:04 +0000
committerDamien Miller <djm@mindrot.org>2017-05-01 10:04:58 +1000
commitcdccebdf85204bf7542b7fcc1aa2ea3f36661833 (patch)
treefd07acdcdebd7da5dc027e58261a446a807466ba /ssh.c
parent97f4d3083b036ce3e68d6346a6140a22123d5864 (diff)
upstream commit
remove SSHv1 ciphers; ok markus@ Upstream-ID: e5ebc5e540d7f23a8c1266db1839794d4d177890
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/ssh.c b/ssh.c
index a682ce91a..c1316f44c 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.455 2017/04/30 23:13:25 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.456 2017/04/30 23:15:04 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -813,27 +813,14 @@ main(int ac, char **av)
813 } 813 }
814 break; 814 break;
815 case 'c': 815 case 'c':
816 if (ciphers_valid(*optarg == '+' ? 816 if (!ciphers_valid(*optarg == '+' ?
817 optarg + 1 : optarg)) { 817 optarg + 1 : optarg)) {
818 /* SSH2 only */
819 free(options.ciphers);
820 options.ciphers = xstrdup(optarg);
821 options.cipher = SSH_CIPHER_INVALID;
822 break;
823 }
824 /* SSH1 only */
825 options.cipher = cipher_number(optarg);
826 if (options.cipher == -1) {
827 fprintf(stderr, "Unknown cipher type '%s'\n", 818 fprintf(stderr, "Unknown cipher type '%s'\n",
828 optarg); 819 optarg);
829 exit(255); 820 exit(255);
830 } 821 }
831 if (options.cipher == SSH_CIPHER_3DES) 822 free(options.ciphers);
832 options.ciphers = xstrdup("3des-cbc"); 823 options.ciphers = xstrdup(optarg);
833 else if (options.cipher == SSH_CIPHER_BLOWFISH)
834 options.ciphers = xstrdup("blowfish-cbc");
835 else
836 options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT);
837 break; 824 break;
838 case 'm': 825 case 'm':
839 if (mac_valid(optarg)) { 826 if (mac_valid(optarg)) {