diff options
Diffstat (limited to 'kexdhc.c')
-rw-r--r-- | kexdhc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexdhc.c,v 1.17 2015/01/19 20:16:15 markus Exp $ */ | 1 | /* $OpenBSD: kexdhc.c,v 1.18 2015/01/26 06:10:03 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -114,7 +114,9 @@ input_kex_dh(int type, u_int32_t seq, void *ctxt) | |||
114 | (r = sshkey_from_blob(server_host_key_blob, sbloblen, | 114 | (r = sshkey_from_blob(server_host_key_blob, sbloblen, |
115 | &server_host_key)) != 0) | 115 | &server_host_key)) != 0) |
116 | goto out; | 116 | goto out; |
117 | if (server_host_key->type != kex->hostkey_type) { | 117 | if (server_host_key->type != kex->hostkey_type || |
118 | (kex->hostkey_type == KEY_ECDSA && | ||
119 | server_host_key->ecdsa_nid != kex->hostkey_nid)) { | ||
118 | r = SSH_ERR_KEY_TYPE_MISMATCH; | 120 | r = SSH_ERR_KEY_TYPE_MISMATCH; |
119 | goto out; | 121 | goto out; |
120 | } | 122 | } |