From 9c88f6248e9da14cb7916527862f2eac7f55b12a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 19 Nov 2016 16:02:49 +0000 Subject: 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 --- regress/test-exec.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'regress/test-exec.sh') 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 # 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 @@ -526,10 +530,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 -- cgit v1.2.3