xref: /freebsd/crypto/openssh/regress/putty-kex.sh (revision 19261079b74319502c6ffa1249920079f0f69a72)
1*19261079SEd Maste#	$OpenBSD: putty-kex.sh,v 1.5 2020/01/23 03:24:38 dtucker Exp $
2ce3adf43SDag-Erling Smørgrav#	Placed in the Public Domain.
3ce3adf43SDag-Erling Smørgrav
4ce3adf43SDag-Erling Smørgravtid="putty KEX"
5ce3adf43SDag-Erling Smørgrav
6ce3adf43SDag-Erling Smørgravif test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
7ce3adf43SDag-Erling Smørgrav	echo "putty interop tests not enabled"
8ce3adf43SDag-Erling Smørgrav	exit 0
9ce3adf43SDag-Erling Smørgravfi
10ce3adf43SDag-Erling Smørgrav
11*19261079SEd Mastefor k in dh-gex-sha1 dh-group1-sha1 dh-group14-sha1 ecdh ; do
12ce3adf43SDag-Erling Smørgrav	verbose "$tid: kex $k"
13ce3adf43SDag-Erling Smørgrav	cp ${OBJ}/.putty/sessions/localhost_proxy \
14ce3adf43SDag-Erling Smørgrav	    ${OBJ}/.putty/sessions/kex_$k
15ce3adf43SDag-Erling Smørgrav	echo "KEX=$k" >> ${OBJ}/.putty/sessions/kex_$k
16ce3adf43SDag-Erling Smørgrav
1747dd1d1bSDag-Erling Smørgrav	env HOME=$PWD ${PLINK} -load kex_$k -batch -i ${OBJ}/putty.rsa2 true
18ce3adf43SDag-Erling Smørgrav	if [ $? -ne 0 ]; then
19ce3adf43SDag-Erling Smørgrav		fail "KEX $k failed"
20ce3adf43SDag-Erling Smørgrav	fi
21ce3adf43SDag-Erling Smørgravdone
22ce3adf43SDag-Erling Smørgrav
23