diff options
Diffstat (limited to 'regress/cert-userkey.sh')
-rw-r--r-- | regress/cert-userkey.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh index 319746395..7005fd55e 100644 --- a/regress/cert-userkey.sh +++ b/regress/cert-userkey.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: cert-userkey.sh,v 1.16 2016/05/03 12:15:49 dtucker Exp $ | 1 | # $OpenBSD: cert-userkey.sh,v 1.17 2016/11/30 03:01:33 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="certified user keys" | 4 | tid="certified user keys" |
@@ -354,6 +354,20 @@ test_one "principals key option principals" success "-n mekmitasdigoat" \ | |||
354 | test_one "principals key option no principals" failure "" \ | 354 | test_one "principals key option no principals" failure "" \ |
355 | authorized_keys ',principals="mekmitasdigoat"' | 355 | authorized_keys ',principals="mekmitasdigoat"' |
356 | 356 | ||
357 | # command= options vs. force-command in key | ||
358 | test_one "force-command match true" success \ | ||
359 | "-n ${USER} -Oforce-command=true" \ | ||
360 | authorized_keys ',command="true"' | ||
361 | test_one "force-command match true" failure \ | ||
362 | "-n ${USER} -Oforce-command=false" \ | ||
363 | authorized_keys ',command="false"' | ||
364 | test_one "force-command mismatch 1" failure \ | ||
365 | "-n ${USER} -Oforce-command=false" \ | ||
366 | authorized_keys ',command="true"' | ||
367 | test_one "force-command mismatch 2" failure \ | ||
368 | "-n ${USER} -Oforce-command=true" \ | ||
369 | authorized_keys ',command="false"' | ||
370 | |||
357 | # Wrong certificate | 371 | # Wrong certificate |
358 | cat $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy | 372 | cat $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy |
359 | for ktype in $PLAIN_TYPES ; do | 373 | for ktype in $PLAIN_TYPES ; do |