summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-09-22 12:26:06 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-09-22 12:26:06 +0000
commit5b5ab3caadf67bb6f113f2054df91f593dfca9d8 (patch)
tree4b0a90c00f44e388b1343f1b7d78719d5d3cba87 /regress
parent67f55c1659390b7ec006006f8692bde909612812 (diff)
regress test for each of the key exchange algorithms that we support
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/ssh/Makefile4
-rw-r--r--regress/usr.bin/ssh/kextype.sh26
2 files changed, 29 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile
index 6f38a8c4004..c3e1bb9186d 100644
--- a/regress/usr.bin/ssh/Makefile
+++ b/regress/usr.bin/ssh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.56 2010/09/02 16:12:55 markus Exp $
+# $OpenBSD: Makefile,v 1.57 2010/09/22 12:26:05 djm Exp $
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9
@@ -47,12 +47,14 @@ LTESTS= connect \
forcecommand \
portnum \
keytype \
+ kextype \
cert-hostkey \
cert-userkey
INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
+#LTESTS= cipher-speed
USER!= id -un
CLEANFILES+= authorized_keys_${USER} known_hosts pidfile \
diff --git a/regress/usr.bin/ssh/kextype.sh b/regress/usr.bin/ssh/kextype.sh
new file mode 100644
index 00000000000..ba6fd950942
--- /dev/null
+++ b/regress/usr.bin/ssh/kextype.sh
@@ -0,0 +1,26 @@
+# $OpenBSD: kextype.sh,v 1.1 2010/09/22 12:26:05 djm Exp $
+# Placed in the Public Domain.
+
+tid="login with different key exchange algorithms"
+
+TIME=/usr/bin/time
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
+
+kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521"
+kextypes="$kextypes diffie-hellman-group-exchange-sha256"
+kextypes="$kextypes diffie-hellman-group-exchange-sha1"
+kextypes="$kextypes diffie-hellman-group14-sha1"
+kextypes="$kextypes diffie-hellman-group1-sha1"
+
+tries="1 2 3 4"
+for k in $kextypes; do
+ verbose "kex $k"
+ for i in $tries; do
+ ${SSH} -F $OBJ/ssh_proxy -o KexAlgorithms=$k x true
+ if [ $? -ne 0 ]; then
+ fail "ssh kex $k"
+ fi
+ done
+done
+