diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-06-29 23:59:55 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-06-29 23:59:55 +0000 |
commit | 06ee71b80c2ee6da184e6ad4b4b7a2a10e7ecf53 (patch) | |
tree | a968ca00da7873ee1df6d1c48717815210b76ba4 /regress/usr.bin | |
parent | 2964132324c636e01cdf6e269d23f78656a2b6ef (diff) |
regress tests for key options in AuthorizedPrincipals
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/ssh/cert-userkey.sh | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/cert-userkey.sh b/regress/usr.bin/ssh/cert-userkey.sh index 102b13ab38b..b8120796d7f 100644 --- a/regress/usr.bin/ssh/cert-userkey.sh +++ b/regress/usr.bin/ssh/cert-userkey.sh @@ -1,4 +1,4 @@ -# $OpenBSD: cert-userkey.sh,v 1.5 2010/05/07 11:31:26 djm Exp $ +# $OpenBSD: cert-userkey.sh,v 1.6 2010/06/29 23:59:54 djm Exp $ # Placed in the Public Domain. tid="certified user keys" @@ -79,6 +79,36 @@ for ktype in rsa dsa rsa_v00 dsa_v00 ; do fail "ssh cert connect failed" fi + # authorized_principals with bad key option + verbose "$tid: ${_prefix} authorized_principals bad key opt" + echo 'blah mekmitasdigoat' > $OBJ/authorized_principals_$USER + ${SSH} -2i $OBJ/cert_user_key_${ktype} \ + -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 + if [ $? -eq 0 ]; then + fail "ssh cert connect succeeded unexpectedly" + fi + + # authorized_principals with command=false + verbose "$tid: ${_prefix} authorized_principals command=false" + echo 'command="false" mekmitasdigoat' > \ + $OBJ/authorized_principals_$USER + ${SSH} -2i $OBJ/cert_user_key_${ktype} \ + -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 + if [ $? -eq 0 ]; then + fail "ssh cert connect succeeded unexpectedly" + fi + + + # authorized_principals with command=true + verbose "$tid: ${_prefix} authorized_principals command=true" + echo 'command="true" mekmitasdigoat' > \ + $OBJ/authorized_principals_$USER + ${SSH} -2i $OBJ/cert_user_key_${ktype} \ + -F $OBJ/ssh_proxy somehost false >/dev/null 2>&1 + if [ $? -ne 0 ]; then + fail "ssh cert connect failed" + fi + # Setup for principals= key option rm -f $OBJ/authorized_principals_$USER ( |