summaryrefslogtreecommitdiff
path: root/regress/keytype.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-10-04 11:23:58 +0100
committerColin Watson <cjwatson@debian.org>2017-10-04 11:23:58 +0100
commit62f54f20bf351468e0124f63cc2902ee40d9b0e9 (patch)
tree3e090f2711b94ca5029d3fa3e8047b1ed1448b1f /regress/keytype.sh
parent6fabaf6fd9b07cc8bc6a17c9c4a5b76849cfc874 (diff)
parent66bf74a92131b7effe49fb0eefe5225151869dc5 (diff)
Import openssh_7.6p1.orig.tar.gz
Diffstat (limited to 'regress/keytype.sh')
-rw-r--r--regress/keytype.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/regress/keytype.sh b/regress/keytype.sh
index 8f697788f..88b022de4 100644
--- a/regress/keytype.sh
+++ b/regress/keytype.sh
@@ -1,13 +1,8 @@
1# $OpenBSD: keytype.sh,v 1.4 2015/07/10 06:23:25 markus Exp $ 1# $OpenBSD: keytype.sh,v 1.5 2017/03/20 22:08:06 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="login with different key types" 4tid="login with different key types"
5 5
6TIME=`which time 2>/dev/null`
7if test ! -x "$TIME"; then
8 TIME=""
9fi
10
11cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak 6cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
12cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak 7cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
13 8
@@ -26,8 +21,8 @@ for kt in $ktypes; do
26 rm -f $OBJ/key.$kt 21 rm -f $OBJ/key.$kt
27 bits=`echo ${kt} | awk -F- '{print $2}'` 22 bits=`echo ${kt} | awk -F- '{print $2}'`
28 type=`echo ${kt} | awk -F- '{print $1}'` 23 type=`echo ${kt} | awk -F- '{print $1}'`
29 printf "keygen $type, $bits bits:\t" 24 verbose "keygen $type, $bits bits"
30 ${TIME} ${SSHKEYGEN} -b $bits -q -N '' -t $type -f $OBJ/key.$kt ||\ 25 ${SSHKEYGEN} -b $bits -q -N '' -t $type -f $OBJ/key.$kt ||\
31 fail "ssh-keygen for type $type, $bits bits failed" 26 fail "ssh-keygen for type $type, $bits bits failed"
32done 27done
33 28
@@ -63,8 +58,8 @@ for ut in $ktypes; do
63 ) > $OBJ/known_hosts 58 ) > $OBJ/known_hosts
64 cat $OBJ/key.$ut.pub > $OBJ/authorized_keys_$USER 59 cat $OBJ/key.$ut.pub > $OBJ/authorized_keys_$USER
65 for i in $tries; do 60 for i in $tries; do
66 printf "userkey $ut, hostkey ${ht}:\t" 61 verbose "userkey $ut, hostkey ${ht}"
67 ${TIME} ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true 62 ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
68 if [ $? -ne 0 ]; then 63 if [ $? -ne 0 ]; then
69 fail "ssh userkey $ut, hostkey $ht failed" 64 fail "ssh userkey $ut, hostkey $ht failed"
70 fi 65 fi