summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-11-19 16:02:49 +0000
committerColin Watson <cjwatson@debian.org>2016-11-19 16:03:10 +0000
commit9c88f6248e9da14cb7916527862f2eac7f55b12a (patch)
tree7fe22ed8b89bcfafbbc22173026e8e4eaba2aa33 /regress/test-exec.sh
parentb139635512b1af75e82252c0c71ac66e08b78774 (diff)
Fix PuTTY interop tests
A while back I got a patch into PuTTY (although it hasn't yet made it into an upstream release) to add passphrase-file options to puttygen. Use these to make the PuTTY interop tests non-interactive. Fix up a few details of the saved session. When plink is given a saved session name, it expects that *instead* of the host name (or IP address), not in addition to it. Drop "127.0.0.1" from the various plink test command lines. (It is possible that the last two of these represent compatibility breaks of some kind; but if they are, then that ship sailed sufficiently long ago - at least seven years, possibly more - that it's no longer worth worrying about it. It's more useful to test interoperability with current versions.) Origin: https://bugzilla.mindrot.org/attachment.cgi?id=2891 Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2639 Last-Update: 2016-11-19 Patch-Name: fix-putty-interop-tests.patch
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 1b6526d0b..74b365cac 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -513,7 +513,11 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
513 513
514 # Add a PuTTY key to authorized_keys 514 # Add a PuTTY key to authorized_keys
515 rm -f ${OBJ}/putty.rsa2 515 rm -f ${OBJ}/putty.rsa2
516 puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null 516 if ! puttygen -t rsa -o ${OBJ}/putty.rsa2 \
517 --new-passphrase /dev/null < /dev/null > /dev/null; then
518 echo "Your installed version of PuTTY is too old to support --new-passphrase; trying without (may require manual interaction) ..." >&2
519 puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null
520 fi
517 puttygen -O public-openssh ${OBJ}/putty.rsa2 \ 521 puttygen -O public-openssh ${OBJ}/putty.rsa2 \
518 >> $OBJ/authorized_keys_$USER 522 >> $OBJ/authorized_keys_$USER
519 523
@@ -526,10 +530,12 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
526 # Setup proxied session 530 # Setup proxied session
527 mkdir -p ${OBJ}/.putty/sessions 531 mkdir -p ${OBJ}/.putty/sessions
528 rm -f ${OBJ}/.putty/sessions/localhost_proxy 532 rm -f ${OBJ}/.putty/sessions/localhost_proxy
529 echo "Hostname=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy 533 echo "Protocol=ssh" >> ${OBJ}/.putty/sessions/localhost_proxy
534 echo "HostName=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy
530 echo "PortNumber=$PORT" >> ${OBJ}/.putty/sessions/localhost_proxy 535 echo "PortNumber=$PORT" >> ${OBJ}/.putty/sessions/localhost_proxy
531 echo "ProxyMethod=5" >> ${OBJ}/.putty/sessions/localhost_proxy 536 echo "ProxyMethod=5" >> ${OBJ}/.putty/sessions/localhost_proxy
532 echo "ProxyTelnetCommand=sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy 537 echo "ProxyTelnetCommand=sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy
538 echo "ProxyLocalhost=1" >> ${OBJ}/.putty/sessions/localhost_proxy
533 539
534 REGRESS_INTEROP_PUTTY=yes 540 REGRESS_INTEROP_PUTTY=yes
535fi 541fi