[openssh-commits] [openssh] 04/05: upstream: Factor out PuTTY setup.

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Feb 19 18:49:34 AEDT 2024


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit bbf541ee2afe07b08a8b56fa0dc6f38fcfceef2a
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Fri Feb 9 08:47:42 2024 +0000

    upstream: Factor out PuTTY setup.
    
    Factor out PuTTY and call only when needed.
    
    This allows us to avoid PuTTY key setup when it's not needed, which
    speeds up the overall test run by a couple of percent.
    
    OpenBSD-Regress-ID: c25eaccc3c91bc874400f7c85ce40e9032358c1c
---
 regress/test-exec.sh | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 089ef73c..4576930c 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: test-exec.sh,v 1.105 2023/10/31 04:15:40 dtucker Exp $
+#	$OpenBSD: test-exec.sh,v 1.106 2024/02/09 08:47:42 dtucker Exp $
 #	Placed in the Public Domain.
 
 #SUDO=sudo
@@ -762,6 +762,11 @@ case "$SCRIPT" in
 esac
 
 if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
+    puttysetup() {
+	if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
+		skip "putty interop tests not enabled"
+	fi
+
 	mkdir -p ${OBJ}/.putty
 
 	# Add a PuTTY key to authorized_keys
@@ -794,8 +799,24 @@ if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
 	echo "ProxyTelnetCommand=${OBJ}/sshd-log-wrapper.sh -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy
 	echo "ProxyLocalhost=1" >> ${OBJ}/.putty/sessions/localhost_proxy
 
+	PUTTYVER="`${PLINK} --version | awk '/plink: Release/{print $3}'`"
+	PUTTYMINORVER="`echo ${PUTTYVER} | cut -f2 -d.`"
+	verbose "plink version ${PUTTYVER} minor ${PUTTYMINORVER}"
+
+	# Re-enable ssh-rsa on older PuTTY versions since they don't do newer
+	# key types.
+	if [ "$PUTTYMINORVER" -lt "76" ]; then
+		echo "HostKeyAlgorithms +ssh-rsa" >> ${OBJ}/sshd_proxy
+		echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> ${OBJ}/sshd_proxy
+	fi
+
+	if [ "$PUTTYMINORVER" -le "64" ]; then
+		echo "KexAlgorithms +diffie-hellman-group14-sha1" \
+		    >>${OBJ}/sshd_proxy
+	fi
 	PUTTYDIR=${OBJ}/.putty
 	export PUTTYDIR
+    }
 fi
 
 REGRESS_INTEROP_DROPBEAR=no

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list