1# $OpenBSD: dropbear-kex.sh,v 1.3 2024/06/19 10:10:46 dtucker Exp $ 2# Placed in the Public Domain. 3 4tid="dropbear kex" 5 6if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then 7 skip "dropbear interop tests not enabled" 8fi 9 10cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak 11 12kex="curve25519-sha256 curve25519-sha256@libssh.org" 13if $SSH -Q kex | grep 'diffie-hellman-group14-sha1'; then 14 kex="$kex diffie-hellman-group14-sha256 diffie-hellman-group14-sha1" 15fi 16 17for k in $kex; do 18 verbose "$tid: kex $k" 19 rm -f ${COPY} 20 # dbclient doesn't have switch for kex, so force in server 21 (cat $OBJ/sshd_proxy.bak; echo "KexAlgorithms $k") >$OBJ/sshd_proxy 22 env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/id_ed25519 2>$OBJ/dbclient.log \ 23 -J "$OBJ/ssh_proxy.sh" somehost cat ${DATA} > ${COPY} 24 if [ $? -ne 0 ]; then 25 fail "ssh cat $DATA failed" 26 fi 27 cmp ${DATA} ${COPY} || fail "corrupted copy" 28done 29rm -f ${COPY} 30