diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 18:23:38 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 18:23:38 +1100 |
commit | eab5f0df90cad495ee65abdb557538dbfb625d15 (patch) | |
tree | d93cf676ec18859bee5e6fe5a75b15da761d89a3 /regress | |
parent | b69e033e6704000be33ed6dc47eb9ac28f10b14b (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/Makefile | 27 | ||||
-rw-r--r-- | regress/cert-hostkey.sh | 3 | ||||
-rw-r--r-- | regress/cert-userkey.sh | 3 | ||||
-rw-r--r-- | regress/kextype.sh | 4 | ||||
-rw-r--r-- | regress/keytype.sh | 5 |
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 | ||
59 | INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers | 61 | INTEROP_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 | |||
62 | USER!= id -un | 66 | USER!= id -un |
63 | CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ | 67 | CLEANFILES= 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 | ||
79 | t1: | 83 | t1: |
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 | ||
82 | t2: | 90 | t2: |
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 | ||
121 | t8.out: | ||
122 | ssh-keygen -q -t dsa -N '' -f $@ | ||
123 | |||
124 | t8: t8.out | ||
125 | ssh-keygen -lf t8.out > /dev/null | ||
126 | ssh-keygen -Bf t8.out > /dev/null | ||
127 | |||
128 | t9.out: | ||
129 | test "${TEST_SSH_ECC}" != yes || \ | ||
130 | ssh-keygen -q -t ecdsa -N '' -f | ||
131 | |||
132 | t9: 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 | |||
113 | t-exec: ${LTESTS:=.sh} | 138 | t-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 | ||
153 | interop: ${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 |
7 | ecdsa="" | 7 | ecdsa="" |
8 | if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 | 8 | if "$TEST_SSH_ECC" = "yes"; then |
9 | then | ||
10 | ecdsa=ecdsa | 9 | ecdsa=ecdsa |
11 | fi | 10 | fi |
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 |
7 | ecdsa="" | 7 | ecdsa="" |
8 | if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 | 8 | if "$TEST_SSH_ECC" = "yes"; then |
9 | then | ||
10 | ecdsa=ecdsa | 9 | ecdsa=ecdsa |
11 | fi | 10 | fi |
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 | |||
7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak | 7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak |
8 | cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak | 8 | cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak |
9 | 9 | ||
10 | kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521" | 10 | if "$TEST_SSH_ECC" = "yes"; then |
11 | kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521" | ||
12 | fi | ||
11 | kextypes="$kextypes diffie-hellman-group-exchange-sha256" | 13 | kextypes="$kextypes diffie-hellman-group-exchange-sha256" |
12 | kextypes="$kextypes diffie-hellman-group-exchange-sha1" | 14 | kextypes="$kextypes diffie-hellman-group-exchange-sha1" |
13 | kextypes="$kextypes diffie-hellman-group14-sha1" | 15 | kextypes="$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 | |||
7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak | 7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak |
8 | cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak | 8 | cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak |
9 | 9 | ||
10 | ktypes="dsa-1024 rsa-2048 ecdsa-256 rsa-3072 ecdsa-384 ecdsa-521" | 10 | ktypes="dsa-1024 rsa-2048 rsa-3072" |
11 | if test "$TEST_SSH_ECC" = "yes"; then | ||
12 | ktypes="$ktypes ecdsa-256 ecdsa-384 ecdsa-521" | ||
13 | fi | ||
11 | 14 | ||
12 | for kt in $ktypes; do | 15 | for kt in $ktypes; do |
13 | rm -f $OBJ/key.$kt | 16 | rm -f $OBJ/key.$kt |