- (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.
This commit is contained in:
Darren Tucker 2010-11-05 18:23:38 +11:00
parent b69e033e67
commit eab5f0df90
7 changed files with 44 additions and 8 deletions

View File

@ -43,6 +43,9 @@
- (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case - (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case
check into platform.c check into platform.c
- (dtucker) [regress/keytype.sh] Import new test. - (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 20101025
- (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with

View File

@ -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 # Copyright (c) 1999-2004 Damien Miller
# #
@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 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_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
@ -2209,11 +2209,14 @@ int main(void) {
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(OPENSSL_HAS_ECC, 1, AC_DEFINE(OPENSSL_HAS_ECC, 1,
[libcrypto includes complete ECC support]) [libcrypto includes complete ECC support])
TEST_SSH_ECC=yes
], ],
[ [
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
TEST_SSH_ECC=no
] ]
) )
AC_SUBST(TEST_SSH_ECC)
saved_LIBS="$LIBS" saved_LIBS="$LIBS"
AC_CHECK_LIB(iaf, ia_openinfo, [ AC_CHECK_LIB(iaf, ia_openinfo, [

View File

@ -53,12 +53,16 @@ LTESTS= connect \
localcommand \ localcommand \
forcecommand \ forcecommand \
portnum \ portnum \
keytype \
kextype \
cert-hostkey \ cert-hostkey \
cert-userkey cert-userkey
INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
#LTESTS= cipher-speed
USER!= id -un USER!= id -un
CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ 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 \ t8.out t8.out.pub t9.out t9.out.pub \
@ -78,6 +82,10 @@ TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
t1: t1:
ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv 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: t2:
cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out 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 -lf $(OBJ)/t7.out > /dev/null
ssh-keygen -Bf $(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} t-exec: ${LTESTS:=.sh}
@if [ "x$?" = "x" ]; then exit 0; fi; \ @if [ "x$?" = "x" ]; then exit 0; fi; \
for TEST in ""$?; do \ 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 $$?; \ (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
done done
# Not run by default
interop: ${INTEROP_TARGETS}

View File

@ -5,8 +5,7 @@ tid="certified host keys"
# used to disable ECC based tests on platforms without ECC # used to disable ECC based tests on platforms without ECC
ecdsa="" ecdsa=""
if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 if "$TEST_SSH_ECC" = "yes"; then
then
ecdsa=ecdsa ecdsa=ecdsa
fi fi

View File

@ -5,8 +5,7 @@ tid="certified user keys"
# used to disable ECC based tests on platforms without ECC # used to disable ECC based tests on platforms without ECC
ecdsa="" ecdsa=""
if grep "#define.*OPENSSL_HAS_ECC" ${BUILDDIR}/config.h >/dev/null 2>&1 if "$TEST_SSH_ECC" = "yes"; then
then
ecdsa=ecdsa ecdsa=ecdsa
fi fi

View File

@ -7,7 +7,9 @@ TIME=/usr/bin/time
cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
cp $OBJ/ssh_proxy $OBJ/ssh_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-sha256"
kextypes="$kextypes diffie-hellman-group-exchange-sha1" kextypes="$kextypes diffie-hellman-group-exchange-sha1"
kextypes="$kextypes diffie-hellman-group14-sha1" kextypes="$kextypes diffie-hellman-group14-sha1"

View File

@ -7,7 +7,10 @@ TIME=/usr/bin/time
cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
cp $OBJ/ssh_proxy $OBJ/ssh_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 for kt in $ktypes; do
rm -f $OBJ/key.$kt rm -f $OBJ/key.$kt