summaryrefslogtreecommitdiffstats
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh28
1 files changed, 25 insertions, 3 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 089ef73..ad62794 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.108 2024/03/08 11:34:10 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -104,6 +104,9 @@ DBCLIENT=/usr/local/bin/dbclient
DROPBEARKEY=/usr/local/bin/dropbearkey
DROPBEARCONVERT=/usr/local/bin/dropbearconvert
+# So we can override this in Portable.
+TEST_SHELL="${TEST_SHELL:-/bin/sh}"
+
# Tools used by multiple tests
NC=$OBJ/netcat
# Always use the one configure tells us to, even if that's empty.
@@ -761,7 +764,11 @@ case "$SCRIPT" in
*) REGRESS_INTEROP_PUTTY=no ;;
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,9 +801,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
if test -x "$DROPBEARKEY" -a -x "$DBCLIENT" -a -x "$DROPBEARCONVERT"; then