summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kexecdhs.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-01-26 06:10:04 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-01-26 06:10:04 +0000
commit389ac8b33d47ae61ce9be5aeb46b2d16669e100a (patch)
treed52dde068a42d9f00483613e7507eac5548493ae /usr.bin/ssh/kexecdhs.c
parent70b20ffd839d8da4561c9af7ae2d37bd5d804b0b (diff)
correctly match ECDSA subtype (== curve) for offered/recevied
host keys. Fixes connection-killing host key mismatches when a server offers multiple ECDSA keys with different curve type (an extremely unlikely configuration). ok markus, "looks mechanical" deraadt@
Diffstat (limited to 'usr.bin/ssh/kexecdhs.c')
-rw-r--r--usr.bin/ssh/kexecdhs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/kexecdhs.c b/usr.bin/ssh/kexecdhs.c
index 48e9226730e..13be60feb34 100644
--- a/usr.bin/ssh/kexecdhs.c
+++ b/usr.bin/ssh/kexecdhs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhs.c,v 1.13 2015/01/20 07:55:33 djm Exp $ */
+/* $OpenBSD: kexecdhs.c,v 1.14 2015/01/26 06:10:03 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -91,8 +91,10 @@ input_kex_ecdh_init(int type, u_int32_t seq, void *ctxt)
r = SSH_ERR_INVALID_ARGUMENT;
goto out;
}
- server_host_public = kex->load_host_public_key(kex->hostkey_type, ssh);
- server_host_private = kex->load_host_private_key(kex->hostkey_type, ssh);
+ server_host_public = kex->load_host_public_key(kex->hostkey_type,
+ kex->hostkey_nid, ssh);
+ server_host_private = kex->load_host_private_key(kex->hostkey_type,
+ kex->hostkey_nid, ssh);
if (server_host_public == NULL) {
r = SSH_ERR_NO_HOSTKEY_LOADED;
goto out;