summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/kex.c b/kex.c
index bb1bd6616..6cc2935fe 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.136 2018/02/07 02:06:50 jsing 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 *
@@ -603,11 +603,9 @@ kex_free(struct kex *kex)
603 u_int mode; 603 u_int mode;
604 604
605#ifdef WITH_OPENSSL 605#ifdef WITH_OPENSSL
606 if (kex->dh) 606 DH_free(kex->dh);
607 DH_free(kex->dh);
608#ifdef OPENSSL_HAS_ECC 607#ifdef OPENSSL_HAS_ECC
609 if (kex->ec_client_key) 608 EC_KEY_free(kex->ec_client_key);
610 EC_KEY_free(kex->ec_client_key);
611#endif /* OPENSSL_HAS_ECC */ 609#endif /* OPENSSL_HAS_ECC */
612#endif /* WITH_OPENSSL */ 610#endif /* WITH_OPENSSL */
613 for (mode = 0; mode < MODE_MAX; mode++) { 611 for (mode = 0; mode < MODE_MAX; mode++) {
@@ -694,9 +692,6 @@ choose_mac(struct ssh *ssh, struct sshmac *mac, char *client, char *server)
694 free(name); 692 free(name);
695 return SSH_ERR_INTERNAL_ERROR; 693 return SSH_ERR_INTERNAL_ERROR;
696 } 694 }
697 /* truncate the key */
698 if (ssh->compat & SSH_BUG_HMAC)
699 mac->key_len = 16;
700 mac->name = name; 695 mac->name = name;
701 mac->key = NULL; 696 mac->key = NULL;
702 mac->enabled = 0; 697 mac->enabled = 0;
@@ -885,8 +880,7 @@ kex_choose_conf(struct ssh *ssh)
885 kex->dh_need = dh_need; 880 kex->dh_need = dh_need;
886 881
887 /* ignore the next message if the proposals do not match */ 882 /* ignore the next message if the proposals do not match */
888 if (first_kex_follows && !proposals_match(my, peer) && 883 if (first_kex_follows && !proposals_match(my, peer))
889 !(ssh->compat & SSH_BUG_FIRSTKEX))
890 ssh->dispatch_skip_packets = 1; 884 ssh->dispatch_skip_packets = 1;
891 r = 0; 885 r = 0;
892 out: 886 out: