diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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 | * |
@@ -587,11 +587,9 @@ kex_free(struct kex *kex) | |||
587 | u_int mode; | 587 | u_int mode; |
588 | 588 | ||
589 | #ifdef WITH_OPENSSL | 589 | #ifdef WITH_OPENSSL |
590 | if (kex->dh) | 590 | DH_free(kex->dh); |
591 | DH_free(kex->dh); | ||
592 | #ifdef OPENSSL_HAS_ECC | 591 | #ifdef OPENSSL_HAS_ECC |
593 | if (kex->ec_client_key) | 592 | EC_KEY_free(kex->ec_client_key); |
594 | EC_KEY_free(kex->ec_client_key); | ||
595 | #endif /* OPENSSL_HAS_ECC */ | 593 | #endif /* OPENSSL_HAS_ECC */ |
596 | #endif /* WITH_OPENSSL */ | 594 | #endif /* WITH_OPENSSL */ |
597 | for (mode = 0; mode < MODE_MAX; mode++) { | 595 | for (mode = 0; mode < MODE_MAX; mode++) { |
@@ -675,9 +673,6 @@ choose_mac(struct ssh *ssh, struct sshmac *mac, char *client, char *server) | |||
675 | free(name); | 673 | free(name); |
676 | return SSH_ERR_INTERNAL_ERROR; | 674 | return SSH_ERR_INTERNAL_ERROR; |
677 | } | 675 | } |
678 | /* truncate the key */ | ||
679 | if (ssh->compat & SSH_BUG_HMAC) | ||
680 | mac->key_len = 16; | ||
681 | mac->name = name; | 676 | mac->name = name; |
682 | mac->key = NULL; | 677 | mac->key = NULL; |
683 | mac->enabled = 0; | 678 | mac->enabled = 0; |
@@ -866,8 +861,7 @@ kex_choose_conf(struct ssh *ssh) | |||
866 | kex->dh_need = dh_need; | 861 | kex->dh_need = dh_need; |
867 | 862 | ||
868 | /* ignore the next message if the proposals do not match */ | 863 | /* ignore the next message if the proposals do not match */ |
869 | if (first_kex_follows && !proposals_match(my, peer) && | 864 | if (first_kex_follows && !proposals_match(my, peer)) |
870 | !(ssh->compat & SSH_BUG_FIRSTKEX)) | ||
871 | ssh->dispatch_skip_packets = 1; | 865 | ssh->dispatch_skip_packets = 1; |
872 | r = 0; | 866 | r = 0; |
873 | out: | 867 | out: |