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