1*069ac184SEd Maste# $OpenBSD: dropbear-ciphers.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $ 2*069ac184SEd Maste# Placed in the Public Domain. 3*069ac184SEd Maste 4*069ac184SEd Mastetid="dropbear ciphers" 5*069ac184SEd Maste 6*069ac184SEd Masteif test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then 7*069ac184SEd Maste skip "dropbear interop tests not enabled" 8*069ac184SEd Mastefi 9*069ac184SEd Maste 10*069ac184SEd Mastecat >>$OBJ/sshd_proxy <<EOD 11*069ac184SEd MastePubkeyAcceptedAlgorithms +ssh-rsa,ssh-dss 12*069ac184SEd MasteHostkeyAlgorithms +ssh-rsa,ssh-dss 13*069ac184SEd MasteEOD 14*069ac184SEd Maste 15*069ac184SEd Masteciphers=`$DBCLIENT -c help 2>&1 | awk '/ ciphers: /{print $4}' | tr ',' ' '` 16*069ac184SEd Mastemacs=`$DBCLIENT -m help 2>&1 | awk '/ MACs: /{print $4}' | tr ',' ' '` 17*069ac184SEd Mastekeytype=`(cd $OBJ/.dropbear && ls id_*)` 18*069ac184SEd Maste 19*069ac184SEd Mastefor c in $ciphers ; do 20*069ac184SEd Maste for m in $macs; do 21*069ac184SEd Maste for kt in $keytype; do 22*069ac184SEd Maste verbose "$tid: cipher $c mac $m kt $kt" 23*069ac184SEd Maste rm -f ${COPY} 24*069ac184SEd Maste env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/$kt 2>$OBJ/dbclient.log \ 25*069ac184SEd Maste -c $c -m $m -J "$OBJ/ssh_proxy.sh" somehost cat ${DATA} > ${COPY} 26*069ac184SEd Maste if [ $? -ne 0 ]; then 27*069ac184SEd Maste fail "ssh cat $DATA failed" 28*069ac184SEd Maste fi 29*069ac184SEd Maste cmp ${DATA} ${COPY} || fail "corrupted copy" 30*069ac184SEd Maste done 31*069ac184SEd Maste done 32*069ac184SEd Mastedone 33*069ac184SEd Masterm -f ${COPY} 34