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 | |
parent | b69e033e6704000be33ed6dc47eb9ac28f10b14b (diff) | |
download | openssh-git-eab5f0df90cad495ee65abdb557538dbfb625d15.tar.gz |
- (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.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-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 |
7 files changed, 44 insertions, 8 deletions
@@ -43,6 +43,9 @@ - (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case check into platform.c - (dtucker) [regress/keytype.sh] Import new test. + - (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. 20101025 - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with diff --git a/configure.ac b/configure.ac index 39b68c70..97d4e6bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.456 2010/11/05 01:03:05 dtucker Exp $ +# $Id: configure.ac,v 1.457 2010/11/05 07:23:38 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.456 $) +AC_REVISION($Revision: 1.457 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -2209,11 +2209,14 @@ int main(void) { AC_MSG_RESULT(yes) AC_DEFINE(OPENSSL_HAS_ECC, 1, [libcrypto includes complete ECC support]) + TEST_SSH_ECC=yes ], [ AC_MSG_RESULT(no) + TEST_SSH_ECC=no ] ) +AC_SUBST(TEST_SSH_ECC) saved_LIBS="$LIBS" AC_CHECK_LIB(iaf, ia_openinfo, [ diff --git a/regress/Makefile b/regress/Makefile index f51307f0..d5668f08 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -53,12 +53,16 @@ LTESTS= connect \ localcommand \ 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= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ t8.out t8.out.pub t9.out t9.out.pub \ @@ -78,6 +82,10 @@ TEST_ENV= "MALLOC_OPTIONS=AFGJPRX" t1: ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv + tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv + ssh-keygen -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv + awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv + ssh-keygen -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv t2: cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out @@ -110,6 +118,23 @@ t7: $(OBJ)/t7.out ssh-keygen -lf $(OBJ)/t7.out > /dev/null ssh-keygen -Bf $(OBJ)/t7.out > /dev/null +t8.out: + ssh-keygen -q -t dsa -N '' -f $@ + +t8: t8.out + ssh-keygen -lf t8.out > /dev/null + ssh-keygen -Bf t8.out > /dev/null + +t9.out: + test "${TEST_SSH_ECC}" != yes || \ + ssh-keygen -q -t ecdsa -N '' -f + +t9: t9.out + test "${TEST_SSH_ECC}" != yes || \ + ssh-keygen -lf t9.out > /dev/null + test "${TEST_SSH_ECC}" != yes || \ + ssh-keygen -Bf t9.out > /dev/null + t-exec: ${LTESTS:=.sh} @if [ "x$?" = "x" ]; then exit 0; fi; \ for TEST in ""$?; do \ @@ -124,3 +149,5 @@ t-exec-interop: ${INTEROP_TESTS:=.sh} (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ done +# Not run by default +interop: ${INTEROP_TARGETS} diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh index 7461beca..1ae5d0bd 100644 --- a/regress/cert-hostkey.sh +++ b/regress/cert-hostkey.sh @@ -5,8 +5,7 @@ tid="certified host keys" # used to disable ECC based tests on platforms without ECC ecdsa="" -if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 -then +if "$TEST_SSH_ECC" = "yes"; then ecdsa=ecdsa fi diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh index a7760a2f..a42c7f34 100644 --- a/regress/cert-userkey.sh +++ b/regress/cert-userkey.sh @@ -5,8 +5,7 @@ tid="certified user keys" # used to disable ECC based tests on platforms without ECC ecdsa="" -if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 -then +if "$TEST_SSH_ECC" = "yes"; then ecdsa=ecdsa fi diff --git a/regress/kextype.sh b/regress/kextype.sh index ba6fd950..22ceb40c 100644 --- a/regress/kextype.sh +++ b/regress/kextype.sh @@ -7,7 +7,9 @@ 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" +if "$TEST_SSH_ECC" = "yes"; then + kextypes="ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521" +fi kextypes="$kextypes diffie-hellman-group-exchange-sha256" kextypes="$kextypes diffie-hellman-group-exchange-sha1" kextypes="$kextypes diffie-hellman-group14-sha1" diff --git a/regress/keytype.sh b/regress/keytype.sh index 7be3cc0c..cd902458 100644 --- a/regress/keytype.sh +++ b/regress/keytype.sh @@ -7,7 +7,10 @@ TIME=/usr/bin/time cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak -ktypes="dsa-1024 rsa-2048 ecdsa-256 rsa-3072 ecdsa-384 ecdsa-521" +ktypes="dsa-1024 rsa-2048 rsa-3072" +if test "$TEST_SSH_ECC" = "yes"; then + ktypes="$ktypes ecdsa-256 ecdsa-384 ecdsa-521" +fi for kt in $ktypes; do rm -f $OBJ/key.$kt |