summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-11-07 02:48:39 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-11-07 02:48:39 +0000
commita724bb5dd3ed3b3ed4ac9f8daa934996e5a0da65 (patch)
tree7954fe83ea10864e2ace4e3ce72e1de3b04cb35d
parent13926800f421be49f79f29a3cb569f61138a2dea (diff)
Use ssh -Q instead of hardcoding lists of ciphers or MACs.
-rw-r--r--regress/usr.bin/ssh/cipher-speed.sh12
-rw-r--r--regress/usr.bin/ssh/integrity.sh11
-rw-r--r--regress/usr.bin/ssh/try-ciphers.sh19
3 files changed, 8 insertions, 34 deletions
diff --git a/regress/usr.bin/ssh/cipher-speed.sh b/regress/usr.bin/ssh/cipher-speed.sh
index 63d59b3bea3..7e8762a387d 100644
--- a/regress/usr.bin/ssh/cipher-speed.sh
+++ b/regress/usr.bin/ssh/cipher-speed.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: cipher-speed.sh,v 1.9 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: cipher-speed.sh,v 1.10 2013/11/07 02:48:38 dtucker Exp $
# Placed in the Public Domain.
tid="cipher speed"
@@ -10,15 +10,7 @@ getbytes ()
tries="1 2"
-ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
- arcfour128 arcfour256 arcfour
- aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
- aes128-ctr aes192-ctr aes256-ctr
- aes128-gcm@openssh.com aes256-gcm@openssh.com"
-macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com
- hmac-sha1-96 hmac-md5-96 hmac-sha2-256 hmac-sha2-512"
-
-for c in $ciphers; do n=0; for m in $macs; do
+for c in `${SSH} -Q cipher`; do n=0; for m in `${SSH} -Q mac`; do
trace "proto 2 cipher $c mac $m"
for x in $tries; do
printf "$c/$m:\t"
diff --git a/regress/usr.bin/ssh/integrity.sh b/regress/usr.bin/ssh/integrity.sh
index 798bb58c6c2..f2d3f65b1d8 100644
--- a/regress/usr.bin/ssh/integrity.sh
+++ b/regress/usr.bin/ssh/integrity.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: integrity.sh,v 1.10 2013/05/17 01:32:11 dtucker Exp $
+# $OpenBSD: integrity.sh,v 1.11 2013/11/07 02:48:38 dtucker Exp $
# Placed in the Public Domain.
tid="integrity"
@@ -8,15 +8,10 @@ tid="integrity"
# XXX and ssh tries to read...
tries=10
startoffset=2900
-macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com
- hmac-sha1-96 hmac-md5-96 hmac-sha2-256 hmac-sha2-512
- hmac-sha1-etm@openssh.com hmac-md5-etm@openssh.com
- umac-64-etm@openssh.com umac-128-etm@openssh.com
- hmac-sha1-96-etm@openssh.com hmac-md5-96-etm@openssh.com
- hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
+macs=`${SSH} -Q mac`
# The following are not MACs, but ciphers with integrated integrity. They are
# handled specially below.
-macs="$macs aes128-gcm@openssh.com aes256-gcm@openssh.com"
+macs="$macs `${SSH} -Q cipher | grep gcm@openssh.com`"
# sshd-command for proxy (see test-exec.sh)
cmd="sh ${SRC}/sshd-log-wrapper.sh ${SSHD} ${TEST_SSHD_LOGFILE} -i -f $OBJ/sshd_proxy"
diff --git a/regress/usr.bin/ssh/try-ciphers.sh b/regress/usr.bin/ssh/try-ciphers.sh
index 41b2a60059c..48584329914 100644
--- a/regress/usr.bin/ssh/try-ciphers.sh
+++ b/regress/usr.bin/ssh/try-ciphers.sh
@@ -1,24 +1,11 @@
-# $OpenBSD: try-ciphers.sh,v 1.20 2013/05/17 10:16:26 dtucker Exp $
+# $OpenBSD: try-ciphers.sh,v 1.21 2013/11/07 02:48:38 dtucker Exp $
# Placed in the Public Domain.
tid="try ciphers"
-ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
- arcfour128 arcfour256 arcfour
- aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
- aes128-ctr aes192-ctr aes256-ctr
- aes128-gcm@openssh.com aes256-gcm@openssh.com"
-macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com
- hmac-sha1-96 hmac-md5-96 hmac-sha2-256 hmac-sha2-512
- hmac-sha1-etm@openssh.com hmac-md5-etm@openssh.com
- umac-64-etm@openssh.com umac-128-etm@openssh.com
- hmac-sha1-96-etm@openssh.com hmac-md5-96-etm@openssh.com
- hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com
- hmac-ripemd160-etm@openssh.com"
-
-for c in $ciphers; do
+for c in `${SSH} -Q cipher`; do
n=0
- for m in $macs; do
+ for m in `${SSH} -Q mac`; do
trace "proto 2 cipher $c mac $m"
verbose "test $tid: proto 2 cipher $c mac $m"
${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true