summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2024-06-19 12:10:46 +0200
committerDarren Tucker <dtucker@dtucker.net>2024-06-19 12:36:57 +0200
commit5521060e35ada9f957cecdddc06d0524e75409ef (patch)
tree4f8c62e27ab883bf65556ddc6870bc0a9444bb0f
parentupstream: Rework dropbear key setup (diff)
downloadopenssh-5521060e35ada9f957cecdddc06d0524e75409ef.tar.xz
openssh-5521060e35ada9f957cecdddc06d0524e75409ef.zip
upstream: Use ed25519 keys for kex tests
since that's supported by OpenSSH even when built without OpenSSL. Only test diffie-hellman kex if OpenSSH is compiled with support for it. OpenBSD-Regress-ID: a5d09ef9bbd171f9e4ec73ed0d9eeb49a8878e97
-rw-r--r--regress/dropbear-kex.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/regress/dropbear-kex.sh b/regress/dropbear-kex.sh
index 092a26ff2..d9f1b32c0 100644
--- a/regress/dropbear-kex.sh
+++ b/regress/dropbear-kex.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: dropbear-kex.sh,v 1.2 2024/06/18 06:14:27 anton Exp $
+# $OpenBSD: dropbear-kex.sh,v 1.3 2024/06/19 10:10:46 dtucker Exp $
# Placed in the Public Domain.
tid="dropbear kex"
@@ -7,21 +7,19 @@ if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then
skip "dropbear interop tests not enabled"
fi
-cat >>$OBJ/sshd_proxy <<EOD
-PubkeyAcceptedAlgorithms +ssh-rsa
-HostkeyAlgorithms +ssh-rsa
-EOD
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak
-kex="curve25519-sha256 curve25519-sha256@libssh.org
- diffie-hellman-group14-sha256 diffie-hellman-group14-sha1"
+kex="curve25519-sha256 curve25519-sha256@libssh.org"
+if $SSH -Q kex | grep 'diffie-hellman-group14-sha1'; then
+ kex="$kex diffie-hellman-group14-sha256 diffie-hellman-group14-sha1"
+fi
for k in $kex; do
verbose "$tid: kex $k"
rm -f ${COPY}
# dbclient doesn't have switch for kex, so force in server
(cat $OBJ/sshd_proxy.bak; echo "KexAlgorithms $k") >$OBJ/sshd_proxy
- env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/id_rsa 2>$OBJ/dbclient.log \
+ env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/id_ed25519 2>$OBJ/dbclient.log \
-J "$OBJ/ssh_proxy.sh" somehost cat ${DATA} > ${COPY}
if [ $? -ne 0 ]; then
fail "ssh cat $DATA failed"