summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-09-24 07:15:39 +0000
committerDamien Miller <djm@mindrot.org>2015-10-06 12:28:41 +1100
commit21ae8ee3b630b0925f973db647a1b9aa5fcdd4c5 (patch)
treece6e0dc93ade2ce966bd62efd950f59ca970303a /regress
parente14ac43b75e68f1ffbd3e1a5e44143c8ae578dcd (diff)
upstream commit
fix command-line option to match what was actually committed Upstream-Regress-ID: 3e8c24a2044e8afd37e7ce17b69002ca817ac699
Diffstat (limited to 'regress')
-rw-r--r--regress/cert-file.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/regress/cert-file.sh b/regress/cert-file.sh
index f172cfd11..bad923ad0 100644
--- a/regress/cert-file.sh
+++ b/regress/cert-file.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cert-file.sh,v 1.1 2015/09/24 06:16:53 djm Exp $ 1# $OpenBSD: cert-file.sh,v 1.2 2015/09/24 07:15:39 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="ssh with certificates" 4tid="ssh with certificates"
@@ -42,7 +42,7 @@ for p in ${SSH_PROTOCOLS}; do
42 fi 42 fi
43 43
44 # Keys with untrusted cert should fail. 44 # Keys with untrusted cert should fail.
45 opts3="$opts2 -z $OBJ/cert_user_key1_2.pub" 45 opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_2.pub"
46 ${SSH} $opts3 somehost exit 5$p 46 ${SSH} $opts3 somehost exit 5$p
47 r=$? 47 r=$?
48 if [ $r -eq 5$p ]; then 48 if [ $r -eq 5$p ]; then
@@ -50,7 +50,8 @@ for p in ${SSH_PROTOCOLS}; do
50 fi 50 fi
51 51
52 # Good cert with bad key should fail. 52 # Good cert with bad key should fail.
53 opts3="$opts -i $OBJ/user_key2 -z $OBJ/cert_user_key1_1.pub" 53 opts3="$opts -i $OBJ/user_key2"
54 opts3="$opts3 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
54 ${SSH} $opts3 somehost exit 5$p 55 ${SSH} $opts3 somehost exit 5$p
55 r=$? 56 r=$?
56 if [ $r -eq 5$p ]; then 57 if [ $r -eq 5$p ]; then
@@ -58,7 +59,7 @@ for p in ${SSH_PROTOCOLS}; do
58 fi 59 fi
59 60
60 # Keys with one trusted cert, should succeed. 61 # Keys with one trusted cert, should succeed.
61 opts3="$opts2 -z $OBJ/cert_user_key1_1.pub" 62 opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
62 ${SSH} $opts3 somehost exit 5$p 63 ${SSH} $opts3 somehost exit 5$p
63 r=$? 64 r=$?
64 if [ $r -ne 5$p ]; then 65 if [ $r -ne 5$p ]; then
@@ -66,7 +67,8 @@ for p in ${SSH_PROTOCOLS}; do
66 fi 67 fi
67 68
68 # Multiple certs and keys, with one trusted cert, should succeed. 69 # Multiple certs and keys, with one trusted cert, should succeed.
69 opts3="$opts2 -z $OBJ/cert_user_key1_2.pub -z $OBJ/cert_user_key1_1.pub" 70 opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_2.pub"
71 opts3="$opts3 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
70 ${SSH} $opts3 somehost exit 5$p 72 ${SSH} $opts3 somehost exit 5$p
71 r=$? 73 r=$?
72 if [ $r -ne 5$p ]; then 74 if [ $r -ne 5$p ]; then
@@ -115,14 +117,14 @@ if [ $? -eq 52 ]; then
115fi 117fi
116 118
117#with an untrusted certificate, should fail 119#with an untrusted certificate, should fail
118opts="$opts -z $OBJ/cert_user_key1_2.pub" 120opts="$opts -oCertificateFile=$OBJ/cert_user_key1_2.pub"
119${SSH} -2 $opts somehost exit 52 121${SSH} -2 $opts somehost exit 52
120if [ $? -eq 52 ]; then 122if [ $? -eq 52 ]; then
121 fail "ssh connect with agent in protocol 2 succeeded with bad cert" 123 fail "ssh connect with agent in protocol 2 succeeded with bad cert"
122fi 124fi
123 125
124#with an additional trusted certificate, should succeed 126#with an additional trusted certificate, should succeed
125opts="$opts -z $OBJ/cert_user_key1_1.pub" 127opts="$opts -oCertificateFile=$OBJ/cert_user_key1_1.pub"
126${SSH} -2 $opts somehost exit 52 128${SSH} -2 $opts somehost exit 52
127if [ $? -ne 52 ]; then 129if [ $? -ne 52 ]; then
128 fail "ssh connect with agent in protocol 2 failed with good cert" 130 fail "ssh connect with agent in protocol 2 failed with good cert"