diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-26 06:10:03 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-27 00:00:57 +1100 |
commit | 5104db7cbd6cdd9c5971f4358e74414862fc1022 (patch) | |
tree | 94692c77a4888f8adade706324fdee3a999bc6b0 /kex.c | |
parent | 8d4f87258f31cb6def9b3b55b6a7321d84728ff2 (diff) |
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 'kex.c')
-rw-r--r-- | kex.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.103 2015/01/20 23:14:00 deraadt Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.104 2015/01/26 06:10:03 djm 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 | * |
@@ -546,6 +546,7 @@ choose_hostkeyalg(struct kex *k, char *client, char *server) | |||
546 | k->hostkey_type = sshkey_type_from_name(hostkeyalg); | 546 | k->hostkey_type = sshkey_type_from_name(hostkeyalg); |
547 | if (k->hostkey_type == KEY_UNSPEC) | 547 | if (k->hostkey_type == KEY_UNSPEC) |
548 | return SSH_ERR_INTERNAL_ERROR; | 548 | return SSH_ERR_INTERNAL_ERROR; |
549 | k->hostkey_nid = sshkey_ecdsa_nid_from_name(hostkeyalg); | ||
549 | free(hostkeyalg); | 550 | free(hostkeyalg); |
550 | return 0; | 551 | return 0; |
551 | } | 552 | } |