xref: /freebsd/crypto/openssh/regress/putty-kex.sh (revision 47dd1d1b619cc035b82b49a91a25544309ff95ae)
1ca86bcf2SDag-Erling Smørgrav#	$OpenBSD: putty-kex.sh,v 1.4 2016/11/25 03:02:01 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
11ce3adf43SDag-Erling Smørgravfor k in dh-gex-sha1 dh-group1-sha1 dh-group14-sha1 ; 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
17*47dd1d1bSDag-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