2021-08-31 07:13:59 +00:00
|
|
|
# $OpenBSD: putty-ciphers.sh,v 1.9 2021/08/31 07:13:59 dtucker Exp $
|
2008-03-12 13:17:00 +00:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="putty ciphers"
|
|
|
|
|
|
|
|
if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
|
2021-08-31 07:04:50 +00:00
|
|
|
fatal "putty interop tests not enabled"
|
2008-03-12 13:17:00 +00:00
|
|
|
fi
|
|
|
|
|
2021-08-31 06:13:23 +00:00
|
|
|
# Re-enable ssh-rsa on older PuTTY versions.
|
|
|
|
oldver="`${PLINK} --version | awk '/plink: Release/{if ($3<0.76)print "yes"}'`"
|
|
|
|
if [ "x$oldver" = "xyes" ]; then
|
|
|
|
echo "HostKeyalgorithms +ssh-rsa" >> sshd_config
|
|
|
|
fi
|
|
|
|
|
2020-01-23 03:35:07 +00:00
|
|
|
for c in aes 3des aes128-ctr aes192-ctr aes256-ctr chacha20 ; do
|
2008-03-12 13:17:00 +00:00
|
|
|
verbose "$tid: cipher $c"
|
|
|
|
cp ${OBJ}/.putty/sessions/localhost_proxy \
|
|
|
|
${OBJ}/.putty/sessions/cipher_$c
|
|
|
|
echo "Cipher=$c" >> ${OBJ}/.putty/sessions/cipher_$c
|
|
|
|
|
|
|
|
rm -f ${COPY}
|
2018-03-23 02:21:14 +00:00
|
|
|
env HOME=$PWD ${PLINK} -load cipher_$c -batch -i ${OBJ}/putty.rsa2 \
|
2016-11-25 03:02:01 +00:00
|
|
|
cat ${DATA} > ${COPY}
|
2008-03-12 13:17:00 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
fail "ssh cat $DATA failed"
|
|
|
|
fi
|
|
|
|
cmp ${DATA} ${COPY} || fail "corrupted copy"
|
|
|
|
done
|
|
|
|
rm -f ${COPY}
|
|
|
|
|