From: djm@openbsd.org Date: Sun, 6 Jun 2021 11:34:16 +0000 (+0000) Subject: upstream: Match host certificates against host public keys, not private X-Git-Tag: V_8_7_P1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=530739d42f6102668aecd699be0ce59815c1eceb;p=thirdparty%2Fopenssh-portable.git upstream: Match host certificates against host public keys, not private keys. Allows use of certificates with private keys held in a ssh-agent. Reported by Miles Zhou in bz3524; ok dtucker@ OpenBSD-Commit-ID: 25f5bf70003126d19162862d9eb380bf34bac22a --- diff --git a/sshd.c b/sshd.c index b1a22e860..7e80b1749 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.574 2021/06/04 05:09:08 dtucker Exp $ */ +/* $OpenBSD: sshd.c,v 1.575 2021/06/06 11:34:16 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1934,7 +1934,7 @@ main(int ac, char **av) /* Find matching private key */ for (j = 0; j < options.num_host_key_files; j++) { if (sshkey_equal_public(key, - sensitive_data.host_keys[j])) { + sensitive_data.host_pubkeys[j])) { sensitive_data.host_certificates[j] = key; break; }