diff options
Diffstat (limited to 'regress/cipher-speed.sh')
-rw-r--r-- | regress/cipher-speed.sh | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh index 489d9f5fa..a6d53a78d 100644 --- a/regress/cipher-speed.sh +++ b/regress/cipher-speed.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: cipher-speed.sh,v 1.9 2013/05/17 04:29:14 dtucker Exp $ | 1 | # $OpenBSD: cipher-speed.sh,v 1.11 2013/11/21 03:18:51 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="cipher speed" | 4 | tid="cipher speed" |
@@ -11,18 +11,7 @@ getbytes () | |||
11 | 11 | ||
12 | tries="1 2" | 12 | tries="1 2" |
13 | 13 | ||
14 | ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc | 14 | for c in `${SSH} -Q cipher`; do n=0; for m in `${SSH} -Q mac`; do |
15 | arcfour128 arcfour256 arcfour | ||
16 | aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se | ||
17 | aes128-ctr aes192-ctr aes256-ctr" | ||
18 | config_defined OPENSSL_HAVE_EVPGCM && \ | ||
19 | ciphers="$ciphers aes128-gcm@openssh.com aes256-gcm@openssh.com" | ||
20 | macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com | ||
21 | hmac-sha1-96 hmac-md5-96" | ||
22 | config_defined HAVE_EVP_SHA256 && \ | ||
23 | macs="$macs hmac-sha2-256 hmac-sha2-512" | ||
24 | |||
25 | for c in $ciphers; do n=0; for m in $macs; do | ||
26 | trace "proto 2 cipher $c mac $m" | 15 | trace "proto 2 cipher $c mac $m" |
27 | for x in $tries; do | 16 | for x in $tries; do |
28 | printf "%-60s" "$c/$m:" | 17 | printf "%-60s" "$c/$m:" |
@@ -35,10 +24,10 @@ for c in $ciphers; do n=0; for m in $macs; do | |||
35 | fail "ssh -2 failed with mac $m cipher $c" | 24 | fail "ssh -2 failed with mac $m cipher $c" |
36 | fi | 25 | fi |
37 | done | 26 | done |
38 | # No point trying all MACs for GCM since they are ignored. | 27 | # No point trying all MACs for AEAD ciphers since they are ignored. |
39 | case $c in | 28 | if ssh -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then |
40 | aes*-gcm@openssh.com) test $n -gt 0 && break;; | 29 | break |
41 | esac | 30 | fi |
42 | n=`expr $n + 1` | 31 | n=`expr $n + 1` |
43 | done; done | 32 | done; done |
44 | 33 | ||