diff options
Diffstat (limited to 'kexc25519c.c')
-rw-r--r-- | kexc25519c.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kexc25519c.c b/kexc25519c.c index 833ce0544..b7ef65dc3 100644 --- a/kexc25519c.c +++ b/kexc25519c.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexc25519c.c,v 1.6 2015/01/19 20:16:15 markus Exp $ */ | 1 | /* $OpenBSD: kexc25519c.c,v 1.7 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 | * Copyright (c) 2010 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2010 Damien Miller. All rights reserved. |
@@ -92,7 +92,9 @@ input_kex_c25519_reply(int type, u_int32_t seq, void *ctxt) | |||
92 | (r = sshkey_from_blob(server_host_key_blob, sbloblen, | 92 | (r = sshkey_from_blob(server_host_key_blob, sbloblen, |
93 | &server_host_key)) != 0) | 93 | &server_host_key)) != 0) |
94 | goto out; | 94 | goto out; |
95 | if (server_host_key->type != kex->hostkey_type) { | 95 | if (server_host_key->type != kex->hostkey_type || |
96 | (kex->hostkey_type == KEY_ECDSA && | ||
97 | server_host_key->ecdsa_nid != kex->hostkey_nid)) { | ||
96 | r = SSH_ERR_KEY_TYPE_MISMATCH; | 98 | r = SSH_ERR_KEY_TYPE_MISMATCH; |
97 | goto out; | 99 | goto out; |
98 | } | 100 | } |