summaryrefslogtreecommitdiff
path: root/regress/sshcfgparse.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
committerColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
commit4213eec74e74de6310c27a40c3e9759a08a73996 (patch)
treee97a6dcafc6763aea7c804e4e113c2750cb1400d /regress/sshcfgparse.sh
parent102062f825fb26a74295a1c089c00c4c4c76b68a (diff)
parentcdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff)
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'regress/sshcfgparse.sh')
-rw-r--r--regress/sshcfgparse.sh29
1 files changed, 19 insertions, 10 deletions
diff --git a/regress/sshcfgparse.sh b/regress/sshcfgparse.sh
index e0ce568d7..2c00b64ef 100644
--- a/regress/sshcfgparse.sh
+++ b/regress/sshcfgparse.sh
@@ -1,8 +1,15 @@
1# $OpenBSD: sshcfgparse.sh,v 1.4 2018/07/04 13:51:12 djm Exp $ 1# $OpenBSD: sshcfgparse.sh,v 1.5 2019/07/23 13:32:48 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="ssh config parse" 4tid="ssh config parse"
5 5
6dsa=0
7for t in $SSH_KEYTYPES; do
8 case "$t" in
9 ssh-dss) dsa=1 ;;
10 esac
11done
12
6expect_result_present() { 13expect_result_present() {
7 _str="$1" ; shift 14 _str="$1" ; shift
8 for _expect in "$@" ; do 15 for _expect in "$@" ; do
@@ -75,15 +82,17 @@ f=`${SSH} -GF none -opubkeyacceptedkeytypes=-ssh-ed25519 host | \
75expect_result_present "$f" "ssh-ed25519-cert-v01.*" 82expect_result_present "$f" "ssh-ed25519-cert-v01.*"
76expect_result_absent "$f" "ssh-ed25519" "ssh-dss" 83expect_result_absent "$f" "ssh-ed25519" "ssh-dss"
77# Append to default set. 84# Append to default set.
78# XXX this will break for !WITH_OPENSSL 85# This is not tested when built !WITH_OPENSSL
79f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss-cert* host | \ 86if [ "$dsa" = "1" ]; then
80 awk '/^pubkeyacceptedkeytypes /{print $2}'` 87 f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss-cert* host | \
81expect_result_present "$f" "ssh-ed25519" "ssh-dss-cert-v01.*" 88 awk '/^pubkeyacceptedkeytypes /{print $2}'`
82expect_result_absent "$f" "ssh-dss" 89 expect_result_present "$f" "ssh-ed25519" "ssh-dss-cert-v01.*"
83f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss host | \ 90 expect_result_absent "$f" "ssh-dss"
84 awk '/^pubkeyacceptedkeytypes /{print $2}'` 91 f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss host | \
85expect_result_present "$f" "ssh-ed25519" "ssh-ed25519-cert-v01.*" "ssh-dss" 92 awk '/^pubkeyacceptedkeytypes /{print $2}'`
86expect_result_absent "$f" "ssh-dss-cert-v01.*" 93 expect_result_present "$f" "ssh-ed25519" "ssh-ed25519-cert-v01.*" "ssh-dss"
94 expect_result_absent "$f" "ssh-dss-cert-v01.*"
95fi
87 96
88# cleanup 97# cleanup
89rm -f $OBJ/ssh_config.[012] 98rm -f $OBJ/ssh_config.[012]