summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-01-23 05:27:21 +0000
committerDamien Miller <djm@mindrot.org>2018-01-23 16:40:29 +1100
commit14b5c635d1190633b23ac3372379517fb645b0c2 (patch)
tree8ef70b4660b04ba6add4c314d52f84375cb16788 /kex.c
parent7c77991f5de5d8475cbeb7cbb06d0c7d1611d7bb (diff)
upstream commit
Drop compatibility hacks for some ancient SSH implementations, including ssh.com <=2.* and OpenSSH <= 3.*. These versions were all released in or before 2001 and predate the final SSH RFCs. The hacks in question aren't necessary for RFC- compliant SSH implementations. ok markus@ OpenBSD-Commit-ID: 4be81c67db57647f907f4e881fb9341448606138
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kex.c b/kex.c
index d5d5a9dae..83c6199f3 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.c,v 1.134 2017/06/13 12:13:59 djm Exp $ */ 1/* $OpenBSD: kex.c,v 1.135 2018/01/23 05:27:21 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -675,9 +675,6 @@ choose_mac(struct ssh *ssh, struct sshmac *mac, char *client, char *server)
675 free(name); 675 free(name);
676 return SSH_ERR_INTERNAL_ERROR; 676 return SSH_ERR_INTERNAL_ERROR;
677 } 677 }
678 /* truncate the key */
679 if (ssh->compat & SSH_BUG_HMAC)
680 mac->key_len = 16;
681 mac->name = name; 678 mac->name = name;
682 mac->key = NULL; 679 mac->key = NULL;
683 mac->enabled = 0; 680 mac->enabled = 0;
@@ -866,8 +863,7 @@ kex_choose_conf(struct ssh *ssh)
866 kex->dh_need = dh_need; 863 kex->dh_need = dh_need;
867 864
868 /* ignore the next message if the proposals do not match */ 865 /* ignore the next message if the proposals do not match */
869 if (first_kex_follows && !proposals_match(my, peer) && 866 if (first_kex_follows && !proposals_match(my, peer))
870 !(ssh->compat & SSH_BUG_FIRSTKEX))
871 ssh->dispatch_skip_packets = 1; 867 ssh->dispatch_skip_packets = 1;
872 r = 0; 868 r = 0;
873 out: 869 out: