sync with OpenBSD -current
This commit is contained in:
parent
99745de747
commit
efaa6fdefb
23 changed files with 168 additions and 270 deletions
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: dropbear-ciphers.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $
|
||||
# $OpenBSD: dropbear-ciphers.sh,v 1.2 2024/06/19 10:15:51 dtucker Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
tid="dropbear ciphers"
|
||||
|
@ -7,13 +7,23 @@ if test "x$REGRESS_INTEROP_DROPBEAR" != "xyes" ; then
|
|||
skip "dropbear interop tests not enabled"
|
||||
fi
|
||||
|
||||
# Enable all support algorithms
|
||||
algs=`$SSH -Q key-sig | tr '\n' ,`
|
||||
cat >>$OBJ/sshd_proxy <<EOD
|
||||
PubkeyAcceptedAlgorithms +ssh-rsa,ssh-dss
|
||||
HostkeyAlgorithms +ssh-rsa,ssh-dss
|
||||
PubkeyAcceptedAlgorithms $algs
|
||||
HostkeyAlgorithms $algs
|
||||
EOD
|
||||
|
||||
ciphers=`$DBCLIENT -c help 2>&1 | awk '/ ciphers: /{print $4}' | tr ',' ' '`
|
||||
if [ -z "$ciphers" ]; then
|
||||
trace dbclient query ciphers failed, making assumptions.
|
||||
ciphers="chacha20-poly1305@openssh.com aes128-ctr aes256-ctr"
|
||||
fi
|
||||
macs=`$DBCLIENT -m help 2>&1 | awk '/ MACs: /{print $4}' | tr ',' ' '`
|
||||
if [ -z "$macs" ]; then
|
||||
trace dbclient query macs failed, making assumptions.
|
||||
macs="hmac-sha1 hmac-sha2-256"
|
||||
fi
|
||||
keytype=`(cd $OBJ/.dropbear && ls id_*)`
|
||||
|
||||
for c in $ciphers ; do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: dropbear-kex.sh,v 1.1 2023/10/20 06:56:45 dtucker Exp $
|
||||
# $OpenBSD: dropbear-kex.sh,v 1.3 2024/06/19 10:10:46 dtucker Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
tid="dropbear kex"
|
||||
|
@ -7,21 +7,19 @@ 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
|
||||
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak
|
||||
|
||||
kex="curve25519-sha256 curve25519-sha256@libssh.org
|
||||
diffie-hellman-group14-sha256 diffie-hellman-group14-sha1"
|
||||
kex="curve25519-sha256 curve25519-sha256@libssh.org"
|
||||
if $SSH -Q kex | grep 'diffie-hellman-group14-sha1'; then
|
||||
kex="$kex diffie-hellman-group14-sha256 diffie-hellman-group14-sha1"
|
||||
fi
|
||||
|
||||
for k in $kex; do
|
||||
verbose "$tid: kex $k"
|
||||
rm -f ${COPY}
|
||||
# dbclient doesn't have switch for kex, so force in server
|
||||
(cat $OBJ/sshd_proxy.bak; echo "KexAlgorithms $k") >$OBJ/sshd_proxy
|
||||
env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/id_rsa 2>$OBJ/dbclient.log \
|
||||
env HOME=$OBJ dbclient -y -i $OBJ/.dropbear/id_ed25519 2>$OBJ/dbclient.log \
|
||||
-J "$OBJ/ssh_proxy.sh" somehost cat ${DATA} > ${COPY}
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "ssh cat $DATA failed"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: test-exec.sh,v 1.115 2024/06/11 01:58:27 djm Exp $
|
||||
# $OpenBSD: test-exec.sh,v 1.118 2024/06/19 10:08:34 dtucker Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
#SUDO=sudo
|
||||
|
@ -646,16 +646,28 @@ 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
|
||||
for i in rsa ecdsa ed25519 dss; do
|
||||
for i in $kt; do
|
||||
if [ ! -f "$OBJ/.dropbear/id_$i" ]; then
|
||||
($DROPBEARKEY -t $i -f $OBJ/.dropbear/id_$i
|
||||
$DROPBEARCONVERT dropbear openssh \
|
||||
$OBJ/.dropbear/id_$i $OBJ/.dropbear/ossh.id_$i
|
||||
) > /dev/null 2>&1
|
||||
verbose Create dropbear key type $i
|
||||
$DROPBEARKEY -t $i -f $OBJ/.dropbear/id_$i \
|
||||
>/dev/null 2>&1
|
||||
fi
|
||||
$DROPBEARCONVERT dropbear openssh $OBJ/.dropbear/id_$i \
|
||||
$OBJ/.dropbear/ossh.id_$i >/dev/null 2>&1
|
||||
$SSHKEYGEN -y -f $OBJ/.dropbear/ossh.id_$i \
|
||||
>>$OBJ/authorized_keys_$USER
|
||||
rm -f $OBJ/.dropbear/id_$i.pub $OBJ/.dropbear/ossh.id_$i
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue