summaryrefslogtreecommitdiff
path: root/regress/knownhosts-command.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-08-30 01:15:45 +0000
committerDamien Miller <djm@mindrot.org>2021-08-30 11:26:02 +1000
commit7db3e0a9e8477c018757b59ee955f7372c0b55fb (patch)
tree35f8456cd62dac9af59eb266f0bf24ee352f33f8 /regress/knownhosts-command.sh
parent2344750250247111a6c3c6a4fe84ed583a61cc11 (diff)
downloadopenssh-git-7db3e0a9e8477c018757b59ee955f7372c0b55fb.tar.gz
upstream: adapt to RSA/SHA1 deprectation
OpenBSD-Regress-ID: 952397c39a22722880e4de9d1c50bb1a14f907bb
Diffstat (limited to 'regress/knownhosts-command.sh')
-rw-r--r--regress/knownhosts-command.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/regress/knownhosts-command.sh b/regress/knownhosts-command.sh
index f15df670..8472ec81 100644
--- a/regress/knownhosts-command.sh
+++ b/regress/knownhosts-command.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: knownhosts-command.sh,v 1.2 2020/12/22 06:47:24 djm Exp $
+# $OpenBSD: knownhosts-command.sh,v 1.3 2021/08/30 01:15:45 djm Exp $
# Placed in the Public Domain.
tid="known hosts command "
@@ -39,7 +39,9 @@ chmod a+x $OBJ/knownhosts_command
${SSH} -F $OBJ/ssh_proxy x true && fail "ssh connect succeeded with bad exit"
for keytype in ${SSH_HOSTKEY_TYPES} ; do
+ algs=$keytype
test "x$keytype" = "xssh-dss" && continue
+ test "x$keytype" = "xssh-rsa" && algs=ssh-rsa,rsa-sha2-256,rsa-sha2-512
verbose "keytype $keytype"
cat > $OBJ/knownhosts_command << _EOF
#!/bin/sh
@@ -48,6 +50,6 @@ test "x\$1" = "x$keytype" || die "wrong keytype \$1 (expected $keytype)"
test "x\$3" = "x$LOGNAME" || die "wrong username \$3 (expected $LOGNAME)"
grep -- "\$1.*\$2" $OBJ/known_hosts
_EOF
- ${SSH} -F $OBJ/ssh_proxy -oHostKeyAlgorithms=$keytype x true ||
+ ${SSH} -F $OBJ/ssh_proxy -oHostKeyAlgorithms=$algs x true ||
fail "ssh connect failed for keytype $x"
done