summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-12-16 02:39:05 +0000
committerDamien Miller <djm@mindrot.org>2019-12-21 13:35:42 +1100
commite5b7cf8edca7e843adc125621e1dab14507f430a (patch)
tree3b7fd4a0558e25b422d64b341f8c5fd50d15c013 /regress/test-exec.sh
parent40be78f503277bd91c958fa25ea9ef918a2ffd3d (diff)
upstream: test security key host keys in addition to user keys
OpenBSD-Regress-ID: 9fb45326106669a27e4bf150575c321806e275b1
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 4bf4059fc..03dab2031 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.68 2019/11/26 23:43:10 djm Exp $ 1# $OpenBSD: test-exec.sh,v 1.69 2019/12/16 02:39:05 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -493,23 +493,21 @@ export SSH_SK_PROVIDER
493if ! test -z "$SSH_SK_PROVIDER"; then 493if ! test -z "$SSH_SK_PROVIDER"; then
494 EXTRA_AGENT_ARGS='-P/*' # XXX want realpath(1)... 494 EXTRA_AGENT_ARGS='-P/*' # XXX want realpath(1)...
495 echo "SecurityKeyProvider $SSH_SK_PROVIDER" >> $OBJ/ssh_config 495 echo "SecurityKeyProvider $SSH_SK_PROVIDER" >> $OBJ/ssh_config
496 echo "SecurityKeyProvider $SSH_SK_PROVIDER" >> $OBJ/sshd_config
497 echo "SecurityKeyProvider $SSH_SK_PROVIDER" >> $OBJ/sshd_proxy
496fi 498fi
497export EXTRA_AGENT_ARGS 499export EXTRA_AGENT_ARGS
498 500
499filter_sk() {
500 grep -v ^sk
501}
502
503maybe_filter_sk() { 501maybe_filter_sk() {
504 if test -z "$SSH_SK_PROVIDER" ; then 502 if test -z "$SSH_SK_PROVIDER" ; then
505 filter_sk 503 grep -v ^sk
506 else 504 else
507 cat 505 cat
508 fi 506 fi
509} 507}
510 508
511SSH_KEYTYPES=`$SSH -Q key-plain | maybe_filter_sk` 509SSH_KEYTYPES=`$SSH -Q key-plain | maybe_filter_sk`
512SSH_HOSTKEY_TYPES=`$SSH -Q key-plain | filter_sk` 510SSH_HOSTKEY_TYPES=`$SSH -Q key-plain | maybe_filter_sk`
513 511
514for t in ${SSH_KEYTYPES}; do 512for t in ${SSH_KEYTYPES}; do
515 # generate user key 513 # generate user key