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 /sshconnect.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 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index ae3b642cb..df921bec1 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.c,v 1.257 2015/01/26 03:04:46 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect.c,v 1.258 2015/01/26 06:10:03 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1243,7 +1243,8 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key) | |||
1243 | goto out; | 1243 | goto out; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | debug("Server host key: %s %s", sshkey_type(host_key), fp); | 1246 | debug("Server host key: %s %s", |
1247 | compat20 ? sshkey_ssh_name(host_key) : sshkey_type(host_key), fp); | ||
1247 | 1248 | ||
1248 | if (sshkey_equal(previous_host_key, host_key)) { | 1249 | if (sshkey_equal(previous_host_key, host_key)) { |
1249 | debug2("%s: server host key %s %s matches cached key", | 1250 | debug2("%s: server host key %s %s matches cached key", |