]>
Commit | Line | Data |
---|---|---|
9f22d634 | 1 | # $OpenBSD: try-ciphers.sh,v 1.10 2005/05/24 04:10:54 djm Exp $ |
836d58d7 | 2 | # Placed in the Public Domain. |
3 | ||
4 | tid="try ciphers" | |
5 | ||
9f22d634 | 6 | ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc |
7 | arcfour128 arcfour256 arcfour | |
eb9bf761 | 8 | aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se |
9 | aes128-ctr aes192-ctr aes256-ctr" | |
836d58d7 | 10 | macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96" |
11 | ||
12 | for c in $ciphers; do | |
13 | for m in $macs; do | |
14 | trace "proto 2 cipher $c mac $m" | |
15 | verbose "test $tid: proto 2 cipher $c mac $m" | |
16 | ${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true | |
17 | if [ $? -ne 0 ]; then | |
18 | fail "ssh -2 failed with mac $m cipher $c" | |
19 | fi | |
20 | done | |
21 | done | |
22 | ||
23 | ciphers="3des blowfish" | |
24 | for c in $ciphers; do | |
25 | trace "proto 1 cipher $c" | |
26 | verbose "test $tid: proto 1 cipher $c" | |
27 | ${SSH} -F $OBJ/ssh_proxy -1 -c $c somehost true | |
28 | if [ $? -ne 0 ]; then | |
29 | fail "ssh -1 failed with cipher $c" | |
30 | fi | |
31 | done | |
79a00bda | 32 | |
30a3b174 | 33 | if ${SSH} -oCiphers=acss@openssh.org 2>&1 | grep "Bad SSH2 cipher" >/dev/null |
1d64dfd3 | 34 | then |
30a3b174 | 35 | : |
36 | else | |
1d64dfd3 | 37 | |
79a00bda | 38 | echo "Ciphers acss@openssh.org" >> $OBJ/sshd_proxy |
39 | c=acss@openssh.org | |
40 | for m in $macs; do | |
41 | trace "proto 2 $c mac $m" | |
42 | verbose "test $tid: proto 2 cipher $c mac $m" | |
43 | ${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true | |
44 | if [ $? -ne 0 ]; then | |
45 | fail "ssh -2 failed with mac $m cipher $c" | |
46 | fi | |
47 | done | |
1d64dfd3 | 48 | |
49 | fi |