diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2023-10-20 08:56:45 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2023-10-20 09:35:32 +0200 |
commit | fbaa707d455a61d0aef8ae65e02a25bac5351e5c (patch) | |
tree | 8a343dd1ea6c3463130dbf44add870f32b727841 /regress/dropbear-ciphers.sh | |
parent | Update openssl-devel dependency in RPM spec. (diff) | |
download | openssh-fbaa707d455a61d0aef8ae65e02a25bac5351e5c.tar.xz openssh-fbaa707d455a61d0aef8ae65e02a25bac5351e5c.zip |
upstream: Add interop test with Dropbear.
Right now this is only dbclient not the Dropbear server since it won't
currently run as a ProxyCommand.
OpenBSD-Regress-ID: 8cb898c414fcdb252ca6328896b0687acdaee496
Diffstat (limited to 'regress/dropbear-ciphers.sh')
-rw-r--r-- | regress/dropbear-ciphers.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/regress/dropbear-ciphers.sh b/regress/dropbear-ciphers.sh new file mode 100644 index 000000000..2e0f9a1d3 --- /dev/null +++ b/regress/dropbear-ciphers.sh @@ -0,0 +1,33 @@ +# $OpenBSD: dropbear-ciphers.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $ +# Placed in the Public Domain. + +tid="dropbear ciphers" + +if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then + skip "dropbear interop tests not enabled" +fi + +cat >>$OBJ/sshd_proxy <<EOD +PubkeyAcceptedAlgorithms +ssh-rsa,ssh-dss +HostkeyAlgorithms +ssh-rsa,ssh-dss +EOD + +ciphers=`$DBCLIENT -c help 2>&1 | awk '/ ciphers: /{print $4}' | tr ',' ' '` +macs=`$DBCLIENT -m help 2>&1 | awk '/ MACs: /{print $4}' | tr ',' ' '` +keytype=`(cd $OBJ/.dropbear && ls id_*)` + +for c in $ciphers ; do + for m in $macs; do + for kt in $keytype; do + verbose "$tid: cipher $c mac $m kt $kt" + rm -f ${COPY} + env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/$kt 2>$OBJ/dbclient.log \ + -c $c -m $m -J "$OBJ/ssh_proxy.sh" somehost cat ${DATA} > ${COPY} + if [ $? -ne 0 ]; then + fail "ssh cat $DATA failed" + fi + cmp ${DATA} ${COPY} || fail "corrupted copy" + done + done +done +rm -f ${COPY} |