summaryrefslogtreecommitdiff
path: root/regress/cert-hostkey.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-06-08 22:30:27 +0000
committerDamien Miller <djm@mindrot.org>2021-06-09 08:38:51 +1000
commitc785c0ae134a8e8b5c82b2193f64c632a98159e4 (patch)
tree83e2149347e866b1c0fae5c9b5d7caecd1da33a1 /regress/cert-hostkey.sh
parent1a6f6b08e62c78906a3032e8d9a83e721c84574e (diff)
downloadopenssh-git-c785c0ae134a8e8b5c82b2193f64c632a98159e4.tar.gz
upstream: test that UserKnownHostsFile correctly accepts multiple
arguments; would have caught readconf.c r1.356 regression OpenBSD-Regress-ID: 71ca54e66c2a0211b04999263e56390b1f323a6a
Diffstat (limited to 'regress/cert-hostkey.sh')
-rw-r--r--regress/cert-hostkey.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
index ebf6c903..de8652b0 100644
--- a/regress/cert-hostkey.sh
+++ b/regress/cert-hostkey.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: cert-hostkey.sh,v 1.24 2021/02/25 03:27:34 djm Exp $
+# $OpenBSD: cert-hostkey.sh,v 1.25 2021/06/08 22:30:27 djm Exp $
# Placed in the Public Domain.
tid="certified host keys"
@@ -283,11 +283,17 @@ for ktype in $PLAIN_TYPES ; do
) > $OBJ/sshd_proxy
${SSH} -oUserKnownHostsFile=$OBJ/known_hosts-cert \
- -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
- -F $OBJ/ssh_proxy somehost true
+ -oGlobalKnownHostsFile=none -F $OBJ/ssh_proxy somehost true
if [ $? -ne 0 ]; then
fail "ssh cert connect failed"
fi
+ # Also check that it works when the known_hosts file is not in the
+ # first array position.
+ ${SSH} -oUserKnownHostsFile="/dev/null $OBJ/known_hosts-cert" \
+ -oGlobalKnownHostsFile=none -F $OBJ/ssh_proxy somehost true
+ if [ $? -ne 0 ]; then
+ fail "ssh cert connect failed known_hosts 2nd"
+ fi
done
# Wrong certificate