]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Match host certificates against host public keys, not private
authordjm@openbsd.org <djm@openbsd.org>
Sun, 6 Jun 2021 11:34:16 +0000 (11:34 +0000)
committerDamien Miller <djm@mindrot.org>
Sun, 6 Jun 2021 11:35:29 +0000 (21:35 +1000)
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

sshd.c

diff --git a/sshd.c b/sshd.c
index b1a22e860b9552db3ff2cc079da857355af4ec52..7e80b174907ef8cdf34c7c62507fb5f752036c76 100644 (file)
--- 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 <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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;
                        }