2024-06-20 08:23:18 +00:00
|
|
|
# $OpenBSD: dropbear-ciphers.sh,v 1.3 2024/06/20 08:23:18 dtucker Exp $
|
2023-10-20 06:56:45 +00:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="dropbear ciphers"
|
|
|
|
|
|
|
|
if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then
|
|
|
|
skip "dropbear interop tests not enabled"
|
|
|
|
fi
|
|
|
|
|
2024-06-19 10:15:51 +00:00
|
|
|
# Enable all support algorithms
|
|
|
|
algs=`$SSH -Q key-sig | tr '\n' ,`
|
2023-10-20 06:56:45 +00:00
|
|
|
cat >>$OBJ/sshd_proxy <<EOD
|
2024-06-19 10:15:51 +00:00
|
|
|
PubkeyAcceptedAlgorithms $algs
|
|
|
|
HostkeyAlgorithms $algs
|
2023-10-20 06:56:45 +00:00
|
|
|
EOD
|
|
|
|
|
2024-06-20 08:23:18 +00:00
|
|
|
ciphers=`$DBCLIENT -c help hst 2>&1 | awk '/ ciphers: /{print $4}' | tr ',' ' '`
|
|
|
|
macs=`$DBCLIENT -m help hst 2>&1 | awk '/ MACs: /{print $4}' | tr ',' ' '`
|
|
|
|
if [ -z "$macs" ] || [ -z "$ciphers" ]; then
|
|
|
|
skip "dbclient query ciphers '$ciphers' or macs '$macs' failed"
|
2024-06-19 10:15:51 +00:00
|
|
|
fi
|
2023-10-20 06:56:45 +00:00
|
|
|
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}
|