diff options
author | Damien Miller <djm@mindrot.org> | 2013-01-12 22:46:26 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-01-12 22:46:26 +1100 |
commit | 846dc7f21c0dd52bc8cc8f433d464a6561066d00 (patch) | |
tree | 344b6ee5a44fdda491a4066256c82cc8cd363b02 /regress/cipher-speed.sh | |
parent | c20eb8b8eac8b6cb1f86199e16dc7d13902a760b (diff) |
- djm@cvs.openbsd.org 2013/01/12 11:23:53
[regress/cipher-speed.sh regress/integrity.sh regress/try-ciphers.sh]
test AES-GCM modes; feedback markus@
Diffstat (limited to 'regress/cipher-speed.sh')
-rw-r--r-- | regress/cipher-speed.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh index 4f26f7e96..ed7c6f320 100644 --- a/regress/cipher-speed.sh +++ b/regress/cipher-speed.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: cipher-speed.sh,v 1.6 2012/10/05 02:20:48 dtucker Exp $ | 1 | # $OpenBSD: cipher-speed.sh,v 1.7 2013/01/12 11:23:53 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="cipher speed" | 4 | tid="cipher speed" |
@@ -16,12 +16,14 @@ ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc | |||
16 | arcfour128 arcfour256 arcfour | 16 | arcfour128 arcfour256 arcfour |
17 | aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se | 17 | aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se |
18 | aes128-ctr aes192-ctr aes256-ctr" | 18 | aes128-ctr aes192-ctr aes256-ctr" |
19 | config_defined OPENSSL_HAVE_EVPGCM && | ||
20 | ciphers="$ciphers aes128-gcm@openssh.com aes256-gcm@openssh.com" | ||
19 | macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com | 21 | macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com |
20 | hmac-sha1-96 hmac-md5-96" | 22 | hmac-sha1-96 hmac-md5-96" |
21 | config_defined HAVE_EVP_SHA256 && | 23 | config_defined HAVE_EVP_SHA256 && |
22 | macs="$macs hmac-sha2-256 hmac-sha2-512" | 24 | macs="$macs hmac-sha2-256 hmac-sha2-512" |
23 | 25 | ||
24 | for c in $ciphers; do for m in $macs; do | 26 | for c in $ciphers; do n=0; for m in $macs; do |
25 | trace "proto 2 cipher $c mac $m" | 27 | trace "proto 2 cipher $c mac $m" |
26 | for x in $tries; do | 28 | for x in $tries; do |
27 | echon "$c/$m:\t" | 29 | echon "$c/$m:\t" |
@@ -34,6 +36,11 @@ for c in $ciphers; do for m in $macs; do | |||
34 | fail "ssh -2 failed with mac $m cipher $c" | 36 | fail "ssh -2 failed with mac $m cipher $c" |
35 | fi | 37 | fi |
36 | done | 38 | done |
39 | # No point trying all MACs for GCM since they are ignored. | ||
40 | case $c in | ||
41 | aes*-gcm@openssh.com) test $n -gt 0 && break;; | ||
42 | esac | ||
43 | n=$(($n + 1)) | ||
37 | done; done | 44 | done; done |
38 | 45 | ||
39 | ciphers="3des blowfish" | 46 | ciphers="3des blowfish" |