summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2024-06-20 08:18:35 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2024-06-20 08:18:35 +0000
commit328e212d9e0ead2abbc3fbc8c2e84688ea3fd080 (patch)
treed9a9eceafe1cd006d400b89039fb4cff2aac0186 /regress
parentaf70dd635ffc7d8e90a45c5fe7470acd90ac6461 (diff)
Remove dropbear key types not supported by current OpenSSH.
Allows subsequent test runs to work if OpenSSH is rebuilt w/out OpenSSL.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/ssh/test-exec.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh
index 7f532850d8b..9c15661cc94 100644
--- a/regress/usr.bin/ssh/test-exec.sh
+++ b/regress/usr.bin/ssh/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.118 2024/06/19 10:08:34 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.119 2024/06/20 08:18:34 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -646,17 +646,15 @@ esac
if test "$REGRESS_INTEROP_DROPBEAR" = "yes" ; then
trace Create dropbear keys and add to authorized_keys
- kt="ed25519"
- if $SSH -Q key-plain | grep '^ssh-dss$' >/dev/null; then
- kt="$kt dss"
- fi
- if $SSH -Q key-plain | grep '^ssh-rsa$' >/dev/null; then
- kt="$kt rsa"
- fi
- if $SSH -Q key-plain | grep '^ecdsa-sha2' >/dev/null; then
- kt="$kt ecdsa"
- fi
mkdir -p $OBJ/.dropbear
+ kt="ed25519"
+ for i in dss rsa ecdsa; do
+ if $SSH -Q key-plain | grep "$i" >/dev/null; then
+ kt="$kt $i"
+ else
+ rm -f "$OBJ/.dropbear/id_$i"
+ fi
+ done
for i in $kt; do
if [ ! -f "$OBJ/.dropbear/id_$i" ]; then
verbose Create dropbear key type $i