summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2016-11-25 03:02:02 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2016-11-25 03:02:02 +0000
commit3d8a7b987d5edbf9dcd5115c2f7dec7846b8a4a9 (patch)
tree9b180ee0b679b369cfe13e90b49a51af9fedab68 /regress/usr.bin
parentdbe3343329abc0b6d03e72d6b795a23d2dceaca6 (diff)
Allow PuTTY interop tests to run unattended. bz#2639, patch from
cjwatson at debian.org.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/putty-ciphers.sh4
-rw-r--r--regress/usr.bin/ssh/putty-kex.sh5
-rw-r--r--regress/usr.bin/ssh/putty-transfer.sh6
-rw-r--r--regress/usr.bin/ssh/test-exec.sh12
4 files changed, 16 insertions, 11 deletions
diff --git a/regress/usr.bin/ssh/putty-ciphers.sh b/regress/usr.bin/ssh/putty-ciphers.sh
index 2b32196bfac..376e1de1bc9 100644
--- a/regress/usr.bin/ssh/putty-ciphers.sh
+++ b/regress/usr.bin/ssh/putty-ciphers.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: putty-ciphers.sh,v 1.4 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: putty-ciphers.sh,v 1.5 2016/11/25 03:02:01 dtucker Exp $
# Placed in the Public Domain.
tid="putty ciphers"
@@ -15,7 +15,7 @@ for c in aes blowfish 3des arcfour aes128-ctr aes192-ctr aes256-ctr ; do
rm -f ${COPY}
env HOME=$PWD ${PLINK} -load cipher_$c -batch -i putty.rsa2 \
- 127.0.0.1 cat ${DATA} > ${COPY}
+ cat ${DATA} > ${COPY}
if [ $? -ne 0 ]; then
fail "ssh cat $DATA failed"
fi
diff --git a/regress/usr.bin/ssh/putty-kex.sh b/regress/usr.bin/ssh/putty-kex.sh
index 72d8eb59c7c..248107da86b 100644
--- a/regress/usr.bin/ssh/putty-kex.sh
+++ b/regress/usr.bin/ssh/putty-kex.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: putty-kex.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: putty-kex.sh,v 1.4 2016/11/25 03:02:01 dtucker Exp $
# Placed in the Public Domain.
tid="putty KEX"
@@ -13,8 +13,7 @@ for k in dh-gex-sha1 dh-group1-sha1 dh-group14-sha1 ; do
${OBJ}/.putty/sessions/kex_$k
echo "KEX=$k" >> ${OBJ}/.putty/sessions/kex_$k
- env HOME=$PWD ${PLINK} -load kex_$k -batch -i putty.rsa2 \
- 127.0.0.1 true
+ env HOME=$PWD ${PLINK} -load kex_$k -batch -i putty.rsa2 true
if [ $? -ne 0 ]; then
fail "KEX $k failed"
fi
diff --git a/regress/usr.bin/ssh/putty-transfer.sh b/regress/usr.bin/ssh/putty-transfer.sh
index ec212d7136c..23881d3a37e 100644
--- a/regress/usr.bin/ssh/putty-transfer.sh
+++ b/regress/usr.bin/ssh/putty-transfer.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: putty-transfer.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: putty-transfer.sh,v 1.4 2016/11/25 03:02:01 dtucker Exp $
# Placed in the Public Domain.
tid="putty transfer data"
@@ -16,7 +16,7 @@ for p in 2; do
${OBJ}/.putty/sessions/compression_$c
echo "Compression=$c" >> ${OBJ}/.putty/sessions/kex_$k
env HOME=$PWD ${PLINK} -load compression_$c -batch \
- -i putty.rsa$p 127.0.0.1 cat ${DATA} > ${COPY}
+ -i putty.rsa$p cat ${DATA} > ${COPY}
if [ $? -ne 0 ]; then
fail "ssh cat $DATA failed"
fi
@@ -27,7 +27,7 @@ for p in 2; do
rm -f ${COPY}
dd if=$DATA obs=${s} 2> /dev/null | \
env HOME=$PWD ${PLINK} -load compression_$c \
- -batch -i putty.rsa$p 127.0.0.1 \
+ -batch -i putty.rsa$p \
"cat > ${COPY}"
if [ $? -ne 0 ]; then
fail "ssh cat $DATA failed"
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh
index 3982646d9aa..bf03c52ce09 100644
--- a/regress/usr.bin/ssh/test-exec.sh
+++ b/regress/usr.bin/ssh/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.56 2016/11/25 02:56:49 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.57 2016/11/25 03:02:01 dtucker Exp $
# Placed in the Public Domain.
USER=`id -un`
@@ -371,7 +371,11 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
# Add a PuTTY key to authorized_keys
rm -f ${OBJ}/putty.rsa2
- puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null
+ if ! puttygen -t rsa -o ${OBJ}/putty.rsa2 \
+ --new-passphrase /dev/null < /dev/null > /dev/null; then
+ echo "Your installed version of PuTTY is too old to support --new-passphrase; trying without (may require manual interaction) ..." >&2
+ puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null
+ fi
puttygen -O public-openssh ${OBJ}/putty.rsa2 \
>> $OBJ/authorized_keys_$USER
@@ -384,10 +388,12 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
# Setup proxied session
mkdir -p ${OBJ}/.putty/sessions
rm -f ${OBJ}/.putty/sessions/localhost_proxy
- echo "Hostname=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy
+ echo "Protocol=ssh" >> ${OBJ}/.putty/sessions/localhost_proxy
+ echo "HostName=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy
echo "PortNumber=$PORT" >> ${OBJ}/.putty/sessions/localhost_proxy
echo "ProxyMethod=5" >> ${OBJ}/.putty/sessions/localhost_proxy
echo "ProxyTelnetCommand=sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy
+ echo "ProxyLocalhost=1" >> ${OBJ}/.putty/sessions/localhost_proxy
REGRESS_INTEROP_PUTTY=yes
fi