diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-08-10 14:43:03 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-08-10 14:43:18 +0200 |
commit | f1e47b8520e49ba9c036150a4da02e5c448f3098 (patch) | |
tree | 7739d56ca6c3581951cf5a70823b85f7b85a0759 | |
parent | f246174d4221e11cdac2e9b73e41a127f71e597d (diff) | |
download | gnutls-f1e47b8520e49ba9c036150a4da02e5c448f3098.tar.gz |
tests: openpgp-certs tests were moved to cert-tests
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/cert-tests/Makefile.am | 16 | ||||
-rw-r--r-- | tests/cert-tests/data/ca-public.gpg (renamed from tests/openpgp-certs/ca-public.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/ca-secret.gpg (renamed from tests/openpgp-certs/ca-secret.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/selfsigs/alice-mallory-badsig18.pub (renamed from tests/openpgp-certs/selfsigs/alice-mallory-badsig18.pub) | bin | 1118 -> 1118 bytes | |||
-rw-r--r-- | tests/cert-tests/data/selfsigs/alice-mallory-irrelevantsig.pub (renamed from tests/openpgp-certs/selfsigs/alice-mallory-irrelevantsig.pub) | bin | 1071 -> 1071 bytes | |||
-rw-r--r-- | tests/cert-tests/data/selfsigs/alice-mallory-nosig18.pub (renamed from tests/openpgp-certs/selfsigs/alice-mallory-nosig18.pub) | bin | 971 -> 971 bytes | |||
-rw-r--r-- | tests/cert-tests/data/selfsigs/alice.pub (renamed from tests/openpgp-certs/selfsigs/alice.pub) | bin | 1118 -> 1118 bytes | |||
-rw-r--r-- | tests/cert-tests/data/srv-public-127.0.0.1-signed.gpg (renamed from tests/openpgp-certs/srv-public-127.0.0.1-signed.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/srv-public-all-signed.gpg (renamed from tests/openpgp-certs/srv-public-all-signed.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/srv-public-localhost-signed.gpg (renamed from tests/openpgp-certs/srv-public-localhost-signed.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/srv-public.gpg (renamed from tests/openpgp-certs/srv-public.gpg) | 0 | ||||
-rw-r--r-- | tests/cert-tests/data/srv-secret.gpg (renamed from tests/openpgp-certs/srv-secret.gpg) | 0 | ||||
-rwxr-xr-x | tests/cert-tests/openpgp-certs (renamed from tests/openpgp-certs/testcerts) | 18 | ||||
-rwxr-xr-x | tests/cert-tests/openpgp-selfsigs (renamed from tests/openpgp-certs/testselfsigs) | 8 | ||||
-rw-r--r-- | tests/openpgp-certs/Makefile.am | 43 |
17 files changed, 28 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac index 0ba22300e0..dd8396fccd 100644 --- a/configure.ac +++ b/configure.ac @@ -941,7 +941,6 @@ AC_CONFIG_FILES([ tests/ocsp-tests/Makefile tests/dtls/Makefile tests/key-tests/Makefile - tests/openpgp-certs/Makefile tests/scripts/Makefile tests/slow/Makefile tests/suite/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a95510be0..d24f48a3f2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,10 +21,6 @@ SUBDIRS = . cert-tests ocsp-tests key-tests scripts slow dtls windows -if ENABLE_OPENPGP -SUBDIRS += openpgp-certs -endif - if WANT_TEST_SUITE SUBDIRS += suite endif diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am index 94349f3bae..968c3f7a27 100644 --- a/tests/cert-tests/Makefile.am +++ b/tests/cert-tests/Makefile.am @@ -53,7 +53,12 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem data/client.p12 data/noclient.p12 data/unclient.p12 data/pkcs12_2certs.p12 \ data/pkcs12_5certs.p12 data/test-null.p12 data/cert-ca.p12 data/sha256.p12 \ data/key-ca.pem data/key-subca.pem data/key-subsubca.pem data/key-user.pem \ - data/key-dsa.pem data/key-ca-dsa.pem data/key-subca-dsa.pem + data/key-dsa.pem data/key-ca-dsa.pem data/key-subca-dsa.pem \ + data/ca-public.gpg data/srv-public-all-signed.gpg data/srv-secret.gpg \ + data/ca-secret.gpg data/srv-public.gpg data/srv-public-127.0.0.1-signed.gpg \ + data/srv-public-localhost-signed.gpg data/selfsigs/alice-mallory-badsig18.pub \ + data/selfsigs/alice-mallory-irrelevantsig.pub data/selfsigs/alice-mallory-nosig18.pub \ + data/selfsigs/alice.pub dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \ pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \ @@ -63,6 +68,15 @@ if !ENABLE_FIPS140 dist_check_SCRIPTS += pkcs12 endif +if ENABLE_OPENPGP +# The selftest is disabled until we can make it work under Wine and +# under Debian buildds (problem with 127.0.0.2?). +dist_check_SCRIPTS += openpgp-selfsigs +if !WINDOWS +dist_check_SCRIPTS += openpgp-certs +endif +endif + if !HAVE_BUGGY_LIBIDN dist_check_SCRIPTS += certtool-utf8 endif diff --git a/tests/openpgp-certs/ca-public.gpg b/tests/cert-tests/data/ca-public.gpg index b723a56068..b723a56068 100644 --- a/tests/openpgp-certs/ca-public.gpg +++ b/tests/cert-tests/data/ca-public.gpg diff --git a/tests/openpgp-certs/ca-secret.gpg b/tests/cert-tests/data/ca-secret.gpg index 05344005a5..05344005a5 100644 --- a/tests/openpgp-certs/ca-secret.gpg +++ b/tests/cert-tests/data/ca-secret.gpg diff --git a/tests/openpgp-certs/selfsigs/alice-mallory-badsig18.pub b/tests/cert-tests/data/selfsigs/alice-mallory-badsig18.pub Binary files differindex dd4dab1156..dd4dab1156 100644 --- a/tests/openpgp-certs/selfsigs/alice-mallory-badsig18.pub +++ b/tests/cert-tests/data/selfsigs/alice-mallory-badsig18.pub diff --git a/tests/openpgp-certs/selfsigs/alice-mallory-irrelevantsig.pub b/tests/cert-tests/data/selfsigs/alice-mallory-irrelevantsig.pub Binary files differindex 03caa9d122..03caa9d122 100644 --- a/tests/openpgp-certs/selfsigs/alice-mallory-irrelevantsig.pub +++ b/tests/cert-tests/data/selfsigs/alice-mallory-irrelevantsig.pub diff --git a/tests/openpgp-certs/selfsigs/alice-mallory-nosig18.pub b/tests/cert-tests/data/selfsigs/alice-mallory-nosig18.pub Binary files differindex 59f077afcb..59f077afcb 100644 --- a/tests/openpgp-certs/selfsigs/alice-mallory-nosig18.pub +++ b/tests/cert-tests/data/selfsigs/alice-mallory-nosig18.pub diff --git a/tests/openpgp-certs/selfsigs/alice.pub b/tests/cert-tests/data/selfsigs/alice.pub Binary files differindex 399a0ba4ec..399a0ba4ec 100644 --- a/tests/openpgp-certs/selfsigs/alice.pub +++ b/tests/cert-tests/data/selfsigs/alice.pub diff --git a/tests/openpgp-certs/srv-public-127.0.0.1-signed.gpg b/tests/cert-tests/data/srv-public-127.0.0.1-signed.gpg index eae97b3770..eae97b3770 100644 --- a/tests/openpgp-certs/srv-public-127.0.0.1-signed.gpg +++ b/tests/cert-tests/data/srv-public-127.0.0.1-signed.gpg diff --git a/tests/openpgp-certs/srv-public-all-signed.gpg b/tests/cert-tests/data/srv-public-all-signed.gpg index f6e7fad431..f6e7fad431 100644 --- a/tests/openpgp-certs/srv-public-all-signed.gpg +++ b/tests/cert-tests/data/srv-public-all-signed.gpg diff --git a/tests/openpgp-certs/srv-public-localhost-signed.gpg b/tests/cert-tests/data/srv-public-localhost-signed.gpg index 40958f6d38..40958f6d38 100644 --- a/tests/openpgp-certs/srv-public-localhost-signed.gpg +++ b/tests/cert-tests/data/srv-public-localhost-signed.gpg diff --git a/tests/openpgp-certs/srv-public.gpg b/tests/cert-tests/data/srv-public.gpg index f5693d1f0e..f5693d1f0e 100644 --- a/tests/openpgp-certs/srv-public.gpg +++ b/tests/cert-tests/data/srv-public.gpg diff --git a/tests/openpgp-certs/srv-secret.gpg b/tests/cert-tests/data/srv-secret.gpg index 7de4ee35da..7de4ee35da 100644 --- a/tests/openpgp-certs/srv-secret.gpg +++ b/tests/cert-tests/data/srv-secret.gpg diff --git a/tests/openpgp-certs/testcerts b/tests/cert-tests/openpgp-certs index 2f53669544..3cee344253 100755 --- a/tests/openpgp-certs/testcerts +++ b/tests/cert-tests/openpgp-certs @@ -37,7 +37,7 @@ fi echo "Checking OpenPGP certificate verification" eval "${GETPORT}" -launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/srv-public-127.0.0.1-signed.gpg" --pgpkeyfile "${srcdir}/srv-secret.gpg" +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/data/srv-public-127.0.0.1-signed.gpg" --pgpkeyfile "${srcdir}/data/srv-secret.gpg" PID=$! wait_server ${PID} @@ -49,24 +49,24 @@ wait_server ${PID} #"${CLI}" -p "${PORT}" 127.0.0.1 --pgpkeyring ca-public.gpg </dev/null >/dev/null || \ # fail "Connection to verified IP address should have succeeded! (error code $?)" $? -${VALGRIND} "${CLI}" ${DEBUG} -p "${PORT}" 127.0.0.2 --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ +${VALGRIND} "${CLI}" ${DEBUG} -p "${PORT}" 127.0.0.2 --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ fail ${PID} "Connection to unrecognized IP address should have failed!" -${VALGRIND} "${CLI}" ${DEBUG} -p "${PORT}" localhost --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ +${VALGRIND} "${CLI}" ${DEBUG} -p "${PORT}" localhost --priority NORMAL:+CTYPE-OPENPGP --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ fail ${PID} "Connection to unverified (but present) 'localhost' should have failed!" kill ${PID} wait eval "${GETPORT}" -launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/srv-public-localhost-signed.gpg" --pgpkeyfile "${srcdir}/srv-secret.gpg" +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/data/srv-public-localhost-signed.gpg" --pgpkeyfile "${srcdir}/data/srv-secret.gpg" PID=$! wait_server ${PID} -echo | ${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.1 --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ +echo | ${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.1 --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ fail ${PID} "Connection to unverified IP address should have failed! (error code $?)" $? -${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.2 --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ +${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.2 --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ fail ${PID} "Connection to unrecognized IP address should have failed!" #see reason above @@ -77,15 +77,15 @@ kill ${PID} wait eval "${GETPORT}" -launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/srv-public-all-signed.gpg" --pgpkeyfile "${srcdir}/srv-secret.gpg" +launch_server $$ --priority NORMAL:+CTYPE-OPENPGP --pgpcertfile "${srcdir}/data/srv-public-all-signed.gpg" --pgpkeyfile "${srcdir}/data/srv-secret.gpg" PID=$! wait_server ${PID} # give the server a chance to initialize -echo | ${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.1 --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null || \ +echo | ${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.1 --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null || \ fail ${PID} "Connection to signed PGP certificate should have succeeded! (error code $?)" $? -${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.2 --pgpkeyring "${srcdir}/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ +${VALGRIND} "${CLI}" ${DEBUG} --priority NORMAL:+CTYPE-OPENPGP -p "${PORT}" 127.0.0.2 --pgpkeyring "${srcdir}/data/ca-public.gpg" </dev/null >/dev/null 2>&1 && \ fail ${PID} "Connection to unrecognized IP address should have failed!" kill ${PID} diff --git a/tests/openpgp-certs/testselfsigs b/tests/cert-tests/openpgp-selfsigs index 2100c11fc1..7929e53cd6 100755 --- a/tests/openpgp-certs/testselfsigs +++ b/tests/cert-tests/openpgp-selfsigs @@ -34,19 +34,19 @@ fail() { echo "Checking OpenPGP certificate self verification" -("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/selfsigs/alice.pub" \ +("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/selfsigs/alice.pub" \ | grep "^Self Signature verification: ok" > /dev/null) || \ fail "Self sig Verification should have succeeded!" -("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/selfsigs/alice-mallory-badsig18.pub" \ +("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/selfsigs/alice-mallory-badsig18.pub" \ | grep "^Self Signature verification: failed" > /dev/null) || \ fail "Self sig Verification should have failed!" -("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/selfsigs/alice-mallory-irrelevantsig.pub" \ +("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/selfsigs/alice-mallory-irrelevantsig.pub" \ | grep "^Self Signature verification: failed" >/dev/null) || \ fail "Self sig Verification should have failed!" -("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/selfsigs/alice-mallory-nosig18.pub" \ +("${CERTTOOL}" --inraw --pgp-certificate-info --infile "${srcdir}/data/selfsigs/alice-mallory-nosig18.pub" \ | grep "^Self Signature verification: failed" >/dev/null) || \ fail "Self sig Verification should have failed!" diff --git a/tests/openpgp-certs/Makefile.am b/tests/openpgp-certs/Makefile.am deleted file mode 100644 index 8db8736000..0000000000 --- a/tests/openpgp-certs/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2007-2008, 2010, 2012 Free Software Foundation, Inc. -# -# 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 = ca-public.gpg srv-public-all-signed.gpg srv-secret.gpg \ - ca-secret.gpg srv-public.gpg srv-public-127.0.0.1-signed.gpg \ - srv-public-localhost-signed.gpg \ - selfsigs/alice-mallory-badsig18.pub \ - selfsigs/alice-mallory-irrelevantsig.pub \ - selfsigs/alice-mallory-nosig18.pub selfsigs/alice.pub \ - suppressions.valgrind - -dist_check_SCRIPTS = testselfsigs testcerts - -if ENABLE_OPENPGP -# The selftest is disabled until we can make it work under Wine and -# under Debian buildds (problem with 127.0.0.2?). -TESTS = testselfsigs -if !WINDOWS -TESTS += testcerts -endif -endif - -TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ - LC_ALL="C" \ - VALGRIND="$(VALGRIND)" \ - top_builddir="$(top_builddir)" \ - srcdir="$(srcdir)" |