try-ciphers.sh revision 98937
1#	$OpenBSD: try-ciphers.sh,v 1.7 2002/04/03 09:30:01 markus Exp $
2#	Placed in the Public Domain.
3
4tid="try ciphers"
5
6ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour 
7	aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se"
8macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96"
9
10for c in $ciphers; do
11	for m in $macs; do
12		trace "proto 2 cipher $c mac $m"
13		verbose "test $tid: proto 2 cipher $c mac $m"
14		${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true
15		if [ $? -ne 0 ]; then
16			fail "ssh -2 failed with mac $m cipher $c"
17		fi
18	done
19done
20
21ciphers="3des blowfish"
22for c in $ciphers; do
23	trace "proto 1 cipher $c"
24	verbose "test $tid: proto 1 cipher $c"
25	${SSH} -F $OBJ/ssh_proxy -1 -c $c somehost true
26	if [ $? -ne 0 ]; then
27		fail "ssh -1 failed with cipher $c"
28	fi
29done
30