diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-26 07:10:03 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-26 14:00:57 +0100 |
commit | 5104db7cbd6cdd9c5971f4358e74414862fc1022 (patch) | |
tree | 94692c77a4888f8adade706324fdee3a999bc6b0 /kexecdhs.c | |
parent | upstream commit (diff) | |
download | openssh-5104db7cbd6cdd9c5971f4358e74414862fc1022.tar.xz openssh-5104db7cbd6cdd9c5971f4358e74414862fc1022.zip |
upstream commit
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 'kexecdhs.c')
-rw-r--r-- | kexecdhs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kexecdhs.c b/kexecdhs.c index f47a7b207..0adb80e6a 100644 --- a/kexecdhs.c +++ b/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. @@ -95,8 +95,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; |