diff options
Diffstat (limited to 'regress/sshcfgparse.sh')
-rw-r--r-- | regress/sshcfgparse.sh | 29 |
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 | ||
4 | tid="ssh config parse" | 4 | tid="ssh config parse" |
5 | 5 | ||
6 | dsa=0 | ||
7 | for t in $SSH_KEYTYPES; do | ||
8 | case "$t" in | ||
9 | ssh-dss) dsa=1 ;; | ||
10 | esac | ||
11 | done | ||
12 | |||
6 | expect_result_present() { | 13 | expect_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 | \ | |||
75 | expect_result_present "$f" "ssh-ed25519-cert-v01.*" | 82 | expect_result_present "$f" "ssh-ed25519-cert-v01.*" |
76 | expect_result_absent "$f" "ssh-ed25519" "ssh-dss" | 83 | expect_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 |
79 | f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss-cert* host | \ | 86 | if [ "$dsa" = "1" ]; then |
80 | awk '/^pubkeyacceptedkeytypes /{print $2}'` | 87 | f=`${SSH} -GF none -opubkeyacceptedkeytypes=+ssh-dss-cert* host | \ |
81 | expect_result_present "$f" "ssh-ed25519" "ssh-dss-cert-v01.*" | 88 | awk '/^pubkeyacceptedkeytypes /{print $2}'` |
82 | expect_result_absent "$f" "ssh-dss" | 89 | expect_result_present "$f" "ssh-ed25519" "ssh-dss-cert-v01.*" |
83 | f=`${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 | \ |
85 | expect_result_present "$f" "ssh-ed25519" "ssh-ed25519-cert-v01.*" "ssh-dss" | 92 | awk '/^pubkeyacceptedkeytypes /{print $2}'` |
86 | expect_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.*" | ||
95 | fi | ||
87 | 96 | ||
88 | # cleanup | 97 | # cleanup |
89 | rm -f $OBJ/ssh_config.[012] | 98 | rm -f $OBJ/ssh_config.[012] |