diff options
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/dsa/Makefile.am | 34 | ||||
-rw-r--r-- | tests/key-tests/Makefile.am | 10 | ||||
-rw-r--r-- | tests/key-tests/data/cert.dsa.1024.pem (renamed from tests/dsa/cert.dsa.1024.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/cert.dsa.2048.pem (renamed from tests/dsa/cert.dsa.2048.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/cert.dsa.3072.pem (renamed from tests/dsa/cert.dsa.3072.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/dsa-pubkey-1018.pem (renamed from tests/dsa/dsa-pubkey-1018.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/dsa.1024.pem (renamed from tests/dsa/dsa.1024.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/dsa.2048.pem (renamed from tests/dsa/dsa.2048.pem) | 0 | ||||
-rw-r--r-- | tests/key-tests/data/dsa.3072.pem (renamed from tests/dsa/dsa.3072.pem) | 0 | ||||
-rwxr-xr-x | tests/key-tests/dsa (renamed from tests/dsa/testdsa) | 26 |
11 files changed, 22 insertions, 50 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index d373b083f8..8db56d0d6c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,7 +19,7 @@ # along with this file; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -SUBDIRS = . cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \ +SUBDIRS = . cert-tests ocsp-tests key-tests sha2 safe-renegotiation scripts ecdsa \ slow dtls srp windows if ENABLE_OPENPGP diff --git a/tests/dsa/Makefile.am b/tests/dsa/Makefile.am deleted file mode 100644 index 390503fa6b..0000000000 --- a/tests/dsa/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2007-2008, 2010, 2012 Free Software Foundation, Inc. -# -# Author: Simon Josefsson -# -# This file is part of GnuTLS. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -EXTRA_DIST = cert.dsa.1024.pem cert.dsa.2048.pem cert.dsa.3072.pem \ - dsa.1024.pem dsa.2048.pem dsa.3072.pem dsa-pubkey-1018.pem - -dist_check_SCRIPTS = testdsa - -if !WINDOWS -TESTS = testdsa -endif - -TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ - LC_ALL="C" \ - top_builddir="$(top_builddir)" \ - srcdir="$(srcdir)" diff --git a/tests/key-tests/Makefile.am b/tests/key-tests/Makefile.am index 39342e6659..b07d872be7 100644 --- a/tests/key-tests/Makefile.am +++ b/tests/key-tests/Makefile.am @@ -25,12 +25,18 @@ EXTRA_DIST = README data/key-ca.pem data/key-user.pem \ data/openssl-key-ecc.p8 data/key-ecc.p8 data/key-ecc.pem suppressions.valgrind data/encpkcs8.pem data/unencpkcs8.pem data/enc2pkcs8.pem \ data/openssl-3des.p8 data/openssl-3des.p8.txt data/openssl-aes128.p8 \ - data/openssl-aes128.p8.txt data/openssl-aes256.p8 data/openssl-aes256.p8.txt + data/openssl-aes128.p8.txt data/openssl-aes256.p8 data/openssl-aes256.p8.txt \ + data/cert.dsa.1024.pem data/cert.dsa.2048.pem data/cert.dsa.3072.pem \ + data/dsa.1024.pem data/dsa.2048.pem data/dsa.3072.pem data/dsa-pubkey-1018.pem -dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode +dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode dsa TESTS = key-id pkcs8 pkcs8-decode +if !WINDOWS +TESTS += dsa +endif + TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ LC_ALL="C" \ VALGRIND="$(VALGRIND)" \ diff --git a/tests/dsa/cert.dsa.1024.pem b/tests/key-tests/data/cert.dsa.1024.pem index ffde3b69e4..ffde3b69e4 100644 --- a/tests/dsa/cert.dsa.1024.pem +++ b/tests/key-tests/data/cert.dsa.1024.pem diff --git a/tests/dsa/cert.dsa.2048.pem b/tests/key-tests/data/cert.dsa.2048.pem index 2fa5a5f404..2fa5a5f404 100644 --- a/tests/dsa/cert.dsa.2048.pem +++ b/tests/key-tests/data/cert.dsa.2048.pem diff --git a/tests/dsa/cert.dsa.3072.pem b/tests/key-tests/data/cert.dsa.3072.pem index d7f89e6de3..d7f89e6de3 100644 --- a/tests/dsa/cert.dsa.3072.pem +++ b/tests/key-tests/data/cert.dsa.3072.pem diff --git a/tests/dsa/dsa-pubkey-1018.pem b/tests/key-tests/data/dsa-pubkey-1018.pem index b0fafd6c55..b0fafd6c55 100644 --- a/tests/dsa/dsa-pubkey-1018.pem +++ b/tests/key-tests/data/dsa-pubkey-1018.pem diff --git a/tests/dsa/dsa.1024.pem b/tests/key-tests/data/dsa.1024.pem index 3e0c103b95..3e0c103b95 100644 --- a/tests/dsa/dsa.1024.pem +++ b/tests/key-tests/data/dsa.1024.pem diff --git a/tests/dsa/dsa.2048.pem b/tests/key-tests/data/dsa.2048.pem index 12d8e0e58a..12d8e0e58a 100644 --- a/tests/dsa/dsa.2048.pem +++ b/tests/key-tests/data/dsa.2048.pem diff --git a/tests/dsa/dsa.3072.pem b/tests/key-tests/data/dsa.3072.pem index 103e4c11d5..103e4c11d5 100644 --- a/tests/dsa/dsa.3072.pem +++ b/tests/key-tests/data/dsa.3072.pem diff --git a/tests/dsa/testdsa b/tests/key-tests/dsa index e1b9dcf583..17a4472edf 100755 --- a/tests/dsa/testdsa +++ b/tests/key-tests/dsa @@ -37,7 +37,7 @@ fi . "${srcdir}/../scripts/common.sh" -size=`${VALGRIND} "${CERTTOOL}" -i --infile "${srcdir}/dsa-pubkey-1018.pem"|grep "Algorithm Secur"|cut -d '(' -f 2|cut -d ' ' -f 1` +size=`${VALGRIND} "${CERTTOOL}" -i --infile "${srcdir}/data/dsa-pubkey-1018.pem"|grep "Algorithm Secur"|cut -d '(' -f 2|cut -d ' ' -f 1` if test "${size}" != "1024"; then echo "The prime size (${size}) doesn't match the expected: 1024" @@ -52,7 +52,7 @@ echo "Checking various DSA key sizes (port ${PORT})" echo "Checking DSA-1024 with TLS 1.0" eval "${GETPORT}" -launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/cert.dsa.1024.pem" --x509keyfile "${srcdir}/dsa.1024.pem" +launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/data/cert.dsa.1024.pem" --x509keyfile "${srcdir}/data/dsa.1024.pem" PID=$! wait_server "${PID}" @@ -63,19 +63,19 @@ PRIO="--priority NORMAL:+DHE-DSS:+SIGN-DSA-SHA512:+SIGN-DSA-SHA384:+SIGN-DSA-SHA echo "Checking server DSA-1024 with client DSA-1024 and TLS 1.0" #try with client key of 1024 bits (should succeed) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.1024.pem" --x509keyfile "${srcdir}/dsa.1024.pem" </dev/null >/dev/null || \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.1024.pem" --x509keyfile "${srcdir}/data/dsa.1024.pem" </dev/null >/dev/null || \ fail "${PID}" "Failed connection to a server with DSA 1024 key and TLS 1.0!" echo "Checking server DSA-1024 with client DSA-2048 and TLS 1.0" #try with client key of 2048 bits (should fail) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.2048.pem" --x509keyfile "${srcdir}/dsa.2048.pem" </dev/null >/dev/null 2>&1 && \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.2048.pem" --x509keyfile "${srcdir}/data/dsa.2048.pem" </dev/null >/dev/null 2>&1 && \ fail "${PID}" "Succeeded connection to a server with a client DSA 2048 key and TLS 1.0!" echo "Checking server DSA-1024 with client DSA-3072 and TLS 1.0" #try with client key of 3072 bits (should fail) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.3072.pem" --x509keyfile "${srcdir}/dsa.3072.pem" </dev/null >/dev/null 2>&1 && \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.3072.pem" --x509keyfile "${srcdir}/data/dsa.3072.pem" </dev/null >/dev/null 2>&1 && \ fail "${PID}" "Succeeded connection to a server with a client DSA 3072 key and TLS 1.0!" kill "${PID}" @@ -86,7 +86,7 @@ wait echo "Checking DSA-1024 with TLS 1.2" eval "${GETPORT}" -launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/cert.dsa.1024.pem" --x509keyfile "${srcdir}/dsa.1024.pem" +launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/data/cert.dsa.1024.pem" --x509keyfile "${srcdir}/data/dsa.1024.pem" PID=$! wait_server "${PID}" @@ -96,19 +96,19 @@ wait_server "${PID}" echo "Checking server DSA-1024 with client DSA-1024 and TLS 1.2" #try with client key of 1024 bits (should succeed) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.1024.pem" --x509keyfile "${srcdir}/dsa.1024.pem" </dev/null >/dev/null || \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.1024.pem" --x509keyfile "${srcdir}/data/dsa.1024.pem" </dev/null >/dev/null || \ fail "${PID}" "Failed connection to a server with DSA 1024 key and TLS 1.2!" echo "Checking server DSA-1024 with client DSA-2048 and TLS 1.2" #try with client key of 2048 bits (should succeed) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.2048.pem" --x509keyfile "${srcdir}/dsa.2048.pem" </dev/null >/dev/null || \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.2048.pem" --x509keyfile "${srcdir}/data/dsa.2048.pem" </dev/null >/dev/null || \ fail "${PID}" "Failed connection to a server with a client DSA 2048 key and TLS 1.2!" echo "Checking server DSA-1024 with client DSA-3072 and TLS 1.2" #try with client key of 3072 bits (should succeed) -"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/cert.dsa.3072.pem" --x509keyfile "${srcdir}/dsa.3072.pem" </dev/null >/dev/null || \ +"${CLI}" ${DEBUG} ${PRIO} -p "${PORT}" 127.0.0.1 --insecure --x509certfile "${srcdir}/data/cert.dsa.3072.pem" --x509keyfile "${srcdir}/data/dsa.3072.pem" </dev/null >/dev/null || \ fail "${PID}" "Failed connection to a server with a client DSA 3072 key and TLS 1.2!" kill "${PID}" @@ -119,7 +119,7 @@ wait #echo "Checking DSA-2048 with TLS 1.0" #eval "${GETPORT}" -#launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile "${srcdir}/cert.dsa.2048.pem" --x509keyfile "${srcdir}/dsa.2048.pem" +#launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile "${srcdir}/data/cert.dsa.2048.pem" --x509keyfile "${srcdir}/data/dsa.2048.pem" #PID=$! #wait_server "${PID}" @@ -133,7 +133,7 @@ wait echo "Checking DSA-2048 with TLS 1.2" eval "${GETPORT}" -launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/cert.dsa.2048.pem" --x509keyfile "${srcdir}/dsa.2048.pem" +launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/data/cert.dsa.2048.pem" --x509keyfile "${srcdir}/data/dsa.2048.pem" PID=$! wait_server "${PID}" @@ -147,7 +147,7 @@ wait #echo "Checking DSA-3072 with TLS 1.0" -#launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile "${srcdir}/cert.dsa.3072.pem" --x509keyfile "${srcdir}/dsa.3072.pem" +#launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile "${srcdir}/data/cert.dsa.3072.pem" --x509keyfile "${srcdir}/data/dsa.3072.pem" #PID=$! #wait_server "${PID}" # @@ -162,7 +162,7 @@ wait echo "Checking DSA-3072 with TLS 1.2" eval "${GETPORT}" -launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/cert.dsa.3072.pem" --x509keyfile "${srcdir}/dsa.3072.pem" +launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:+DHE-DSS:+SIGN-DSA-SHA256:+SIGN-DSA-SHA1" --x509certfile "${srcdir}/data/cert.dsa.3072.pem" --x509keyfile "${srcdir}/data/dsa.3072.pem" PID=$! wait_server "${PID}" |