[openssh-commits] [openssh] branch master updated: upstream: fix multiple problems with testing hostkey types that are not

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jun 15 11:56:24 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 1d6064d25 upstream: fix multiple problems with testing hostkey types that are not
1d6064d25 is described below

commit 1d6064d25fed17b184ead85ef6fddec1a2132c53
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Jun 15 01:55:44 2026 +0000

    upstream: fix multiple problems with testing hostkey types that are not
    
    enabled by default.
    
    1) Add all hostkey types in the "multiple hostkeys" subtest.
      Previously known_hosts was accidentally clobbered, causing
      only the last added hostkey type to be used.
    2) Explicitly enable the hostkey types under test via
      HostKeyAlgorithms
    
    OpenBSD-Regress-ID: 8f12d18b79b5cc8a748e187a0e95529cd85a9dcc
---
 regress/hostkey-agent.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/regress/hostkey-agent.sh b/regress/hostkey-agent.sh
index 28dcfe170..0e7962e3c 100644
--- a/regress/hostkey-agent.sh
+++ b/regress/hostkey-agent.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: hostkey-agent.sh,v 1.15 2024/12/04 10:51:13 dtucker Exp $
+#	$OpenBSD: hostkey-agent.sh,v 1.16 2026/06/15 01:55:44 djm Exp $
 #	Placed in the Public Domain.
 
 tid="hostkey agent"
@@ -89,13 +89,17 @@ grep -vi 'globalknownhostsfile' $OBJ/ssh_proxy.orig > $OBJ/ssh_proxy
 echo "UpdateHostkeys=yes" >> $OBJ/ssh_proxy
 echo "GlobalKnownHostsFile=none" >> $OBJ/ssh_proxy
 
+HOSTKEYALGS=""
 for k in $SSH_KEYTYPES ; do
 	verbose "Addkey type $k"
 	echo "Hostkey $OBJ/agent-key.${k}" >> $OBJ/sshd_proxy
+	test -z "$HOSTKEYALGS" || HOSTKEYALGS="${HOSTKEYALGS},"
+	HOSTKEYALGS="${HOSTKEYALGS}${k}"
 
 	( printf 'localhost-with-alias ' ;
-    cat $OBJ/agent-key.$k.pub) > $OBJ/known_hosts
+    cat $OBJ/agent-key.$k.pub) >> $OBJ/known_hosts
 done
+echo "HostKeyAlgorithms $HOSTKEYALGS" >> $OBJ/sshd_proxy
 
 opts="-oStrictHostKeyChecking=yes -F $OBJ/ssh_proxy"
 SSH_CONNECTION=`${SSH} $opts host 'echo $SSH_CONNECTION'`

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list