summaryrefslogtreecommitdiff
path: root/regress/cipher-speed.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-07 10:06:42 +0100
committerColin Watson <cjwatson@debian.org>2013-05-07 10:06:42 +0100
commitecebda56da46a03dafff923d91c382f31faa9eec (patch)
tree449614b6c06a2622c74a609b31fcc46c60037c56 /regress/cipher-speed.sh
parentc6a2c0334e45419875687d250aed9bea78480f2e (diff)
parentffc06452028ba78cd693d4ed43df8b60a10d6163 (diff)
merge 6.2p1; reorder additions to monitor.h for easier merging in future
Diffstat (limited to 'regress/cipher-speed.sh')
-rw-r--r--regress/cipher-speed.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh
index 5800f4b09..65e5f35ec 100644
--- a/regress/cipher-speed.sh
+++ b/regress/cipher-speed.sh
@@ -1,29 +1,31 @@
1# $OpenBSD: cipher-speed.sh,v 1.5 2012/06/28 05:07:45 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
4tid="cipher speed" 4tid="cipher speed"
5 5
6getbytes () 6getbytes ()
7{ 7{
8 sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' 8 sed -n -e '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' \
9 -e '/copied/s/.*s, \(.* MB.s\).*/\1/p'
9} 10}
10 11
11tries="1 2" 12tries="1 2"
12DATA=/bin/ls
13DATA=/bsd
14 13
15ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc 14ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
16 arcfour128 arcfour256 arcfour 15 arcfour128 arcfour256 arcfour
17 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se 16 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
18 aes128-ctr aes192-ctr aes256-ctr" 17 aes128-ctr aes192-ctr aes256-ctr"
19macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96" 18config_defined OPENSSL_HAVE_EVPGCM && \
20config_defined HAVE_EVP_SHA256 && 19 ciphers="$ciphers aes128-gcm@openssh.com aes256-gcm@openssh.com"
20macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com
21 hmac-sha1-96 hmac-md5-96"
22config_defined HAVE_EVP_SHA256 && \
21 macs="$macs hmac-sha2-256 hmac-sha2-512" 23 macs="$macs hmac-sha2-256 hmac-sha2-512"
22 24
23for c in $ciphers; do for m in $macs; do 25for c in $ciphers; do n=0; for m in $macs; do
24 trace "proto 2 cipher $c mac $m" 26 trace "proto 2 cipher $c mac $m"
25 for x in $tries; do 27 for x in $tries; do
26 echon "$c/$m:\t" 28 printf "%-60s" "$c/$m:"
27 ( ${SSH} -o 'compression no' \ 29 ( ${SSH} -o 'compression no' \
28 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \ 30 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
29 exec sh -c \'"dd of=/dev/null obs=32k"\' \ 31 exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -33,13 +35,18 @@ for c in $ciphers; do for m in $macs; do
33 fail "ssh -2 failed with mac $m cipher $c" 35 fail "ssh -2 failed with mac $m cipher $c"
34 fi 36 fi
35 done 37 done
38 # No point trying all MACs for GCM since they are ignored.
39 case $c in
40 aes*-gcm@openssh.com) test $n -gt 0 && break;;
41 esac
42 n=`expr $n + 1`
36done; done 43done; done
37 44
38ciphers="3des blowfish" 45ciphers="3des blowfish"
39for c in $ciphers; do 46for c in $ciphers; do
40 trace "proto 1 cipher $c" 47 trace "proto 1 cipher $c"
41 for x in $tries; do 48 for x in $tries; do
42 echon "$c:\t" 49 printf "%-60s" "$c:"
43 ( ${SSH} -o 'compression no' \ 50 ( ${SSH} -o 'compression no' \
44 -F $OBJ/ssh_proxy -1 -c $c somehost \ 51 -F $OBJ/ssh_proxy -1 -c $c somehost \
45 exec sh -c \'"dd of=/dev/null obs=32k"\' \ 52 exec sh -c \'"dd of=/dev/null obs=32k"\' \