summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-11-05 18:23:38 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-11-05 18:23:38 +1100
commiteab5f0df90cad495ee65abdb557538dbfb625d15 (patch)
treed93cf676ec18859bee5e6fe5a75b15da761d89a3 /regress
parentb69e033e6704000be33ed6dc47eb9ac28f10b14b (diff)
- (dtucker) [Makefile configure.ac regress/Makefile regress/keytype.sh]
Import recent changes to regress/Makefile, pass a flag to enable ECC tests from configure through to regress/Makefile and use it in the tests.
Diffstat (limited to 'regress')
-rw-r--r--regress/Makefile27
-rw-r--r--regress/cert-hostkey.sh3
-rw-r--r--regress/cert-userkey.sh3
-rw-r--r--regress/kextype.sh4
-rw-r--r--regress/keytype.sh5
5 files changed, 36 insertions, 6 deletions
diff --git a/regress/Makefile b/regress/Makefile
index f51307f02..d5668f08f 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -53,12 +53,16 @@ LTESTS= connect \
53 localcommand \ 53 localcommand \
54 forcecommand \ 54 forcecommand \
55 portnum \ 55 portnum \
56 keytype \
57 kextype \
56 cert-hostkey \ 58 cert-hostkey \
57 cert-userkey 59 cert-userkey
58 60
59INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers 61INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
60#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp 62#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
61 63
64#LTESTS= cipher-speed
65
62USER!= id -un 66USER!= id -un
63CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ 67CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
64 t8.out t8.out.pub t9.out t9.out.pub \ 68 t8.out t8.out.pub t9.out t9.out.pub \
@@ -78,6 +82,10 @@ TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
78 82
79t1: 83t1:
80 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv 84 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
85 tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
86 ssh-keygen -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
87 awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
88 ssh-keygen -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
81 89
82t2: 90t2:
83 cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out 91 cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
@@ -110,6 +118,23 @@ t7: $(OBJ)/t7.out
110 ssh-keygen -lf $(OBJ)/t7.out > /dev/null 118 ssh-keygen -lf $(OBJ)/t7.out > /dev/null
111 ssh-keygen -Bf $(OBJ)/t7.out > /dev/null 119 ssh-keygen -Bf $(OBJ)/t7.out > /dev/null
112 120
121t8.out:
122 ssh-keygen -q -t dsa -N '' -f $@
123
124t8: t8.out
125 ssh-keygen -lf t8.out > /dev/null
126 ssh-keygen -Bf t8.out > /dev/null
127
128t9.out:
129 test "${TEST_SSH_ECC}" != yes || \
130 ssh-keygen -q -t ecdsa -N '' -f
131
132t9: t9.out
133 test "${TEST_SSH_ECC}" != yes || \
134 ssh-keygen -lf t9.out > /dev/null
135 test "${TEST_SSH_ECC}" != yes || \
136 ssh-keygen -Bf t9.out > /dev/null
137
113t-exec: ${LTESTS:=.sh} 138t-exec: ${LTESTS:=.sh}
114 @if [ "x$?" = "x" ]; then exit 0; fi; \ 139 @if [ "x$?" = "x" ]; then exit 0; fi; \
115 for TEST in ""$?; do \ 140 for TEST in ""$?; do \
@@ -124,3 +149,5 @@ t-exec-interop: ${INTEROP_TESTS:=.sh}
124 (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ 149 (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
125 done 150 done
126 151
152# Not run by default
153interop: ${INTEROP_TARGETS}
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
index 7461beca6..1ae5d0bda 100644
--- a/regress/cert-hostkey.sh
+++ b/regress/cert-hostkey.sh
@@ -5,8 +5,7 @@ tid="certified host keys"
5 5
6# used to disable ECC based tests on platforms without ECC 6# used to disable ECC based tests on platforms without ECC
7ecdsa="" 7ecdsa=""
8if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 8if "$TEST_SSH_ECC" = "yes"; then
9then
10 ecdsa=ecdsa 9 ecdsa=ecdsa
11fi 10fi
12 11
diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
index a7760a2f6..a42c7f34a 100644
--- a/regress/cert-userkey.sh
+++ b/regress/cert-userkey.sh
@@ -5,8 +5,7 @@ tid="certified user keys"
5 5
6# used to disable ECC based tests on platforms without ECC 6# used to disable ECC based tests on platforms without ECC
7ecdsa="" 7ecdsa=""
8if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 8if "$TEST_SSH_ECC" = "yes"; then
9then
10 ecdsa=ecdsa 9 ecdsa=ecdsa
11fi 10fi
12 11
diff --git a/regress/kextype.sh b/regress/kextype.sh
index ba6fd9509..22ceb40c9 100644
--- a/regress/kextype.sh
+++ b/regress/kextype.sh
@@ -7,7 +7,9 @@ TIME=/usr/bin/time
7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak 7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
8cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak 8cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
9 9
10kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521" 10if "$TEST_SSH_ECC" = "yes"; then
11 kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521"
12fi
11kextypes="$kextypes diffie-hellman-group-exchange-sha256" 13kextypes="$kextypes diffie-hellman-group-exchange-sha256"
12kextypes="$kextypes diffie-hellman-group-exchange-sha1" 14kextypes="$kextypes diffie-hellman-group-exchange-sha1"
13kextypes="$kextypes diffie-hellman-group14-sha1" 15kextypes="$kextypes diffie-hellman-group14-sha1"
diff --git a/regress/keytype.sh b/regress/keytype.sh
index 7be3cc0c8..cd9024587 100644
--- a/regress/keytype.sh
+++ b/regress/keytype.sh
@@ -7,7 +7,10 @@ TIME=/usr/bin/time
7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak 7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
8cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak 8cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
9 9
10ktypes="dsa-1024 rsa-2048 ecdsa-256 rsa-3072 ecdsa-384 ecdsa-521" 10ktypes="dsa-1024 rsa-2048 rsa-3072"
11if test "$TEST_SSH_ECC" = "yes"; then
12 ktypes="$ktypes ecdsa-256 ecdsa-384 ecdsa-521"
13fi
11 14
12for kt in $ktypes; do 15for kt in $ktypes; do
13 rm -f $OBJ/key.$kt 16 rm -f $OBJ/key.$kt