summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2024-06-19 12:15:51 +0200
committerDarren Tucker <dtucker@dtucker.net>2024-06-19 12:36:57 +0200
commitfad34b4ca25c0ef31e5aa841d461b6f21da5b8c1 (patch)
tree48aea2b1f782b759aa5b9f66af7dc87b2404b279 /regress
parentupstream: Use ed25519 keys for kex tests (diff)
downloadopenssh-fad34b4ca25c0ef31e5aa841d461b6f21da5b8c1.tar.xz
openssh-fad34b4ca25c0ef31e5aa841d461b6f21da5b8c1.zip
upstream: Provide defaults for ciphers and macs
if querying for them fails since on some versions of Dropbear (at least v2024.85) "-m help" doesn't seem to work. Enable all supported pubkey algorithms in the server. OpenBSD-Regress-ID: 4f95556a49ee9f621789f25217c367a33d2745ca
Diffstat (limited to 'regress')
-rw-r--r--regress/dropbear-ciphers.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/regress/dropbear-ciphers.sh b/regress/dropbear-ciphers.sh
index 2e0f9a1d3..7b0924ce7 100644
--- a/regress/dropbear-ciphers.sh
+++ b/regress/dropbear-ciphers.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: dropbear-ciphers.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $
+# $OpenBSD: dropbear-ciphers.sh,v 1.2 2024/06/19 10:15:51 dtucker Exp $
# Placed in the Public Domain.
tid="dropbear ciphers"
@@ -7,13 +7,23 @@ if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then
skip "dropbear interop tests not enabled"
fi
+# Enable all support algorithms
+algs=`$SSH -Q key-sig | tr '\n' ,`
cat >>$OBJ/sshd_proxy <<EOD
-PubkeyAcceptedAlgorithms +ssh-rsa,ssh-dss
-HostkeyAlgorithms +ssh-rsa,ssh-dss
+PubkeyAcceptedAlgorithms $algs
+HostkeyAlgorithms $algs
EOD
ciphers=`$DBCLIENT -c help 2>&1 | awk '/ ciphers: /{print $4}' | tr ',' ' '`
+if [ -z "$ciphers" ]; then
+ trace dbclient query ciphers failed, making assumptions.
+ ciphers="chacha20-poly1305@openssh.com aes128-ctr aes256-ctr"
+fi
macs=`$DBCLIENT -m help 2>&1 | awk '/ MACs: /{print $4}' | tr ',' ' '`
+if [ -z "$macs" ]; then
+ trace dbclient query macs failed, making assumptions.
+ macs="hmac-sha1 hmac-sha2-256"
+fi
keytype=`(cd $OBJ/.dropbear && ls id_*)`
for c in $ciphers ; do