diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2019-01-27 06:30:53 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-01-27 17:40:42 +1100 |
commit | 2a9b3a2ce411d16cda9c79ab713c55f65b0ec257 (patch) | |
tree | dee5e43c06dd93d090b77a6218f740c450575354 /regress | |
parent | 391ffc4b9d31fa1f4ad566499fef9176ff8a07dc (diff) |
upstream: Generate all key supported key types and enable for keyscan
test.
OpenBSD-Regress-ID: 72f72ff49946c61bc949e1692dd9e3d71370891b
Diffstat (limited to 'regress')
-rw-r--r-- | regress/keyscan.sh | 16 | ||||
-rw-r--r-- | regress/test-exec.sh | 6 |
2 files changed, 15 insertions, 7 deletions
diff --git a/regress/keyscan.sh b/regress/keyscan.sh index 3bde1219a..80e7f972a 100644 --- a/regress/keyscan.sh +++ b/regress/keyscan.sh | |||
@@ -1,14 +1,22 @@ | |||
1 | # $OpenBSD: keyscan.sh,v 1.6 2017/04/30 23:34:55 djm Exp $ | 1 | # $OpenBSD: keyscan.sh,v 1.7 2019/01/27 06:30:53 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="keyscan" | 4 | tid="keyscan" |
5 | 5 | ||
6 | # remove DSA hostkey | 6 | KEYTYPES=`${SSH} -Q key-plain` |
7 | rm -f ${OBJ}/host.dsa | 7 | for i in $KEYTYPES; do |
8 | if [ -z "$algs" ]; then | ||
9 | algs="$i" | ||
10 | else | ||
11 | algs="$algs,$i" | ||
12 | fi | ||
13 | done | ||
14 | echo "HostKeyAlgorithms $algs" >> sshd_config | ||
15 | |||
16 | cat sshd_config | ||
8 | 17 | ||
9 | start_sshd | 18 | start_sshd |
10 | 19 | ||
11 | KEYTYPES=`${SSH} -Q key-plain` | ||
12 | for t in $KEYTYPES; do | 20 | for t in $KEYTYPES; do |
13 | trace "keyscan type $t" | 21 | trace "keyscan type $t" |
14 | ${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \ | 22 | ${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \ |
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 40d46e3cd..e8379e178 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.64 2018/08/10 01:35:49 dtucker Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.65 2019/01/27 06:30:53 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -469,11 +469,11 @@ fi | |||
469 | 469 | ||
470 | rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER | 470 | rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER |
471 | 471 | ||
472 | SSH_KEYTYPES="rsa ed25519" | 472 | SSH_KEYTYPES=`$SSH -Q key-plain` |
473 | 473 | ||
474 | trace "generate keys" | ||
475 | for t in ${SSH_KEYTYPES}; do | 474 | for t in ${SSH_KEYTYPES}; do |
476 | # generate user key | 475 | # generate user key |
476 | trace "generating key type $t" | ||
477 | if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN_BIN} -nt $OBJ/$t ]; then | 477 | if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN_BIN} -nt $OBJ/$t ]; then |
478 | rm -f $OBJ/$t | 478 | rm -f $OBJ/$t |
479 | ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\ | 479 | ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\ |