summaryrefslogtreecommitdiff
path: root/regress/try-ciphers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/try-ciphers.sh')
-rw-r--r--regress/try-ciphers.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/regress/try-ciphers.sh b/regress/try-ciphers.sh
index 2b11b59ea..ca2851713 100644
--- a/regress/try-ciphers.sh
+++ b/regress/try-ciphers.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: try-ciphers.sh,v 1.17 2012/12/11 23:12:13 markus Exp $ 1# $OpenBSD: try-ciphers.sh,v 1.18 2013/01/12 11:23:53 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="try ciphers" 4tid="try ciphers"
@@ -6,7 +6,8 @@ tid="try ciphers"
6ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc 6ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
7 arcfour128 arcfour256 arcfour 7 arcfour128 arcfour256 arcfour
8 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se 8 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
9 aes128-ctr aes192-ctr aes256-ctr" 9 aes128-ctr aes192-ctr aes256-ctr
10 aes128-gcm@openssh.com aes256-gcm@openssh.com"
10macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com 11macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com
11 hmac-sha1-96 hmac-md5-96 12 hmac-sha1-96 hmac-md5-96
12 hmac-sha1-etm@openssh.com hmac-md5-etm@openssh.com 13 hmac-sha1-etm@openssh.com hmac-md5-etm@openssh.com
@@ -18,6 +19,7 @@ config_defined HAVE_EVP_SHA256 &&
18 hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com" 19 hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
19 20
20for c in $ciphers; do 21for c in $ciphers; do
22 n=0
21 for m in $macs; do 23 for m in $macs; do
22 trace "proto 2 cipher $c mac $m" 24 trace "proto 2 cipher $c mac $m"
23 verbose "test $tid: proto 2 cipher $c mac $m" 25 verbose "test $tid: proto 2 cipher $c mac $m"
@@ -25,6 +27,11 @@ for c in $ciphers; do
25 if [ $? -ne 0 ]; then 27 if [ $? -ne 0 ]; then
26 fail "ssh -2 failed with mac $m cipher $c" 28 fail "ssh -2 failed with mac $m cipher $c"
27 fi 29 fi
30 # No point trying all MACs for GCM since they are ignored.
31 case $c in
32 aes*-gcm@openssh.com) test $n -gt 0 && break;;
33 esac
34 n=$(($n + 1))
28 done 35 done
29done 36done
30 37