summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-07-28 12:59:33 +0200
committerGitLab <gitlab@gitlab.com>2016-07-28 13:19:16 +0000
commit5e70830cd863b4090727dc51641ef617a1b92c5e (patch)
treef8ca61cdd16add47bbe79a7da94258f58a90008e
parent0286e233b783c077c93cb3222e89ac2c09bc96fe (diff)
downloadgnutls-5e70830cd863b4090727dc51641ef617a1b92c5e.tar.gz
tests: moved pkcs12 tests into cert-certs/ subdir
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/cert-tests/Makefile.am8
-rw-r--r--tests/cert-tests/data/cert-ca.p12 (renamed from tests/pkcs12-decode/cert-ca.p12)bin2669 -> 2669 bytes
-rw-r--r--tests/cert-tests/data/client.p12 (renamed from tests/pkcs12-decode/client.p12)bin1444 -> 1444 bytes
-rw-r--r--tests/cert-tests/data/noclient.p12 (renamed from tests/pkcs12-decode/noclient.p12)bin1317 -> 1317 bytes
-rw-r--r--tests/cert-tests/data/pkcs12_2certs.p12 (renamed from tests/pkcs12-decode/pkcs12_2certs.p12)bin5853 -> 5853 bytes
-rw-r--r--tests/cert-tests/data/pkcs12_5certs.p12 (renamed from tests/pkcs12-decode/pkcs12_5certs.p12)bin7338 -> 7338 bytes
-rw-r--r--tests/cert-tests/data/sha256.p12 (renamed from tests/pkcs12-decode/sha256.p12)bin1411 -> 1411 bytes
-rw-r--r--tests/cert-tests/data/test-null.p12 (renamed from tests/pkcs12-decode/test-null.p12)bin1649 -> 1649 bytes
-rw-r--r--tests/cert-tests/data/unclient.p12 (renamed from tests/pkcs12-decode/unclient.p12)bin1476 -> 1476 bytes
-rwxr-xr-xtests/cert-tests/pkcs12 (renamed from tests/pkcs12-decode/pkcs12)14
-rw-r--r--tests/pkcs12-decode/Makefile.am39
-rw-r--r--tests/pkcs12-decode/suppressions.valgrind270
13 files changed, 15 insertions, 318 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0c0e08c9b8..16573989bd 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 = . pkcs8-decode pkcs12-decode \
+SUBDIRS = . pkcs8-decode \
cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \
slow dtls srp windows
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index 5b520eb89c..e9cfa171e8 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -49,12 +49,18 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem
data/template-tlsfeature.pem data/template-tlsfeature.csr \
templates/template-tlsfeature-crq.tmpl templates/arb-extensions.tmpl data/arb-extensions.pem \
data/arb-extensions.csr data/pkcs1-pad-ok.pem data/pkcs1-pad-broken.pem \
- data/pkcs1-pad-ok2.pem data/pkcs1-pad-broken2.pem data/pkcs1-pad-broken3.pem
+ data/pkcs1-pad-ok2.pem data/pkcs1-pad-broken2.pem data/pkcs1-pad-broken3.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
dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \
pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \
provable-dh userid
+if !ENABLE_FIPS140
+dist_check_SCRIPTS += pkcs12
+endif
+
if !HAVE_BUGGY_LIBIDN
dist_check_SCRIPTS += certtool-utf8
endif
diff --git a/tests/pkcs12-decode/cert-ca.p12 b/tests/cert-tests/data/cert-ca.p12
index cddde704d1..cddde704d1 100644
--- a/tests/pkcs12-decode/cert-ca.p12
+++ b/tests/cert-tests/data/cert-ca.p12
Binary files differ
diff --git a/tests/pkcs12-decode/client.p12 b/tests/cert-tests/data/client.p12
index f57ce09eef..f57ce09eef 100644
--- a/tests/pkcs12-decode/client.p12
+++ b/tests/cert-tests/data/client.p12
Binary files differ
diff --git a/tests/pkcs12-decode/noclient.p12 b/tests/cert-tests/data/noclient.p12
index 80f3940089..80f3940089 100644
--- a/tests/pkcs12-decode/noclient.p12
+++ b/tests/cert-tests/data/noclient.p12
Binary files differ
diff --git a/tests/pkcs12-decode/pkcs12_2certs.p12 b/tests/cert-tests/data/pkcs12_2certs.p12
index bcbf48b4de..bcbf48b4de 100644
--- a/tests/pkcs12-decode/pkcs12_2certs.p12
+++ b/tests/cert-tests/data/pkcs12_2certs.p12
Binary files differ
diff --git a/tests/pkcs12-decode/pkcs12_5certs.p12 b/tests/cert-tests/data/pkcs12_5certs.p12
index 5fc9cd397d..5fc9cd397d 100644
--- a/tests/pkcs12-decode/pkcs12_5certs.p12
+++ b/tests/cert-tests/data/pkcs12_5certs.p12
Binary files differ
diff --git a/tests/pkcs12-decode/sha256.p12 b/tests/cert-tests/data/sha256.p12
index f6779a1731..f6779a1731 100644
--- a/tests/pkcs12-decode/sha256.p12
+++ b/tests/cert-tests/data/sha256.p12
Binary files differ
diff --git a/tests/pkcs12-decode/test-null.p12 b/tests/cert-tests/data/test-null.p12
index 4db0afb4d7..4db0afb4d7 100644
--- a/tests/pkcs12-decode/test-null.p12
+++ b/tests/cert-tests/data/test-null.p12
Binary files differ
diff --git a/tests/pkcs12-decode/unclient.p12 b/tests/cert-tests/data/unclient.p12
index 68ef420c98..68ef420c98 100644
--- a/tests/pkcs12-decode/unclient.p12
+++ b/tests/cert-tests/data/unclient.p12
Binary files differ
diff --git a/tests/pkcs12-decode/pkcs12 b/tests/cert-tests/pkcs12
index e41afc9246..c52b09b06c 100755
--- a/tests/pkcs12-decode/pkcs12
+++ b/tests/cert-tests/pkcs12
@@ -37,16 +37,16 @@ TMPFILE_PEM=pkcs12.$$.pem.tmp
DEBUG="1"
ret=0
-for p12 in 'client.p12 foobar' noclient.p12 unclient.p12 pkcs12_2certs.p12; do
+for p12 in "client.p12 foobar" "noclient.p12" "unclient.p12" "pkcs12_2certs.p12"; do
set -- ${p12}
file="$1"
passwd="$2"
if test "x$DEBUG" != "x"; then
${VALGRIND} "${CERTTOOL}" -d 99 --p12-info --inder --password "${passwd}" \
- --infile "${srcdir}/${file}"
+ --infile "${srcdir}/data/${file}"
else
${VALGRIND} "${CERTTOOL}" --p12-info --inder --password "${passwd}" \
- --infile "${srcdir}/${file}" >/dev/null
+ --infile "${srcdir}/data/${file}" >/dev/null
fi
rc=$?
if test ${rc} != 0; then
@@ -55,16 +55,16 @@ for p12 in 'client.p12 foobar' noclient.p12 unclient.p12 pkcs12_2certs.p12; do
fi
done
-file=test-null.p12
-${VALGRIND} "${CERTTOOL}" --p12-info --inder --null-password --infile "${srcdir}/${file}" >/dev/null
+file="$srcdir/data/test-null.p12"
+${VALGRIND} "${CERTTOOL}" --p12-info --inder --null-password --infile "${file}" >/dev/null
rc=$?
if test ${rc} != 0; then
echo "PKCS12 FATAL ${file}"
exit 1
fi
-file=sha256.p12
-${VALGRIND} "${CERTTOOL}" --p12-info --inder --password 1234 --infile "${srcdir}/${file}" >/dev/null
+file="$srcdir/data/sha256.p12"
+${VALGRIND} "${CERTTOOL}" --p12-info --inder --password 1234 --infile "${file}" >/dev/null
rc=$?
if test ${rc} != 0; then
echo "PKCS12 FATAL ${file}"
diff --git a/tests/pkcs12-decode/Makefile.am b/tests/pkcs12-decode/Makefile.am
deleted file mode 100644
index f21a82eabf..0000000000
--- a/tests/pkcs12-decode/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-## Process this file with automake to produce Makefile.in
-# Copyright (C) 2006, 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 = client.p12 noclient.p12 unclient.p12 pkcs12_2certs.p12 \
- pkcs12_5certs.p12 test-null.p12 cert-ca.p12 sha256.p12 suppressions.valgrind
-
-dist_check_SCRIPTS = pkcs12
-
-if !ENABLE_FIPS140
-TESTS = pkcs12
-endif
-
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
- LC_ALL="C" \
- VALGRIND="$(VALGRIND)" \
- top_builddir="$(top_builddir)" \
- srcdir="$(srcdir)"
-
-if WANT_TEST_SUITE
-LOG_COMPILER = $(VALGRIND)
-endif
diff --git a/tests/pkcs12-decode/suppressions.valgrind b/tests/pkcs12-decode/suppressions.valgrind
deleted file mode 100644
index 47e4cda8b4..0000000000
--- a/tests/pkcs12-decode/suppressions.valgrind
+++ /dev/null
@@ -1,270 +0,0 @@
-# suppressions -- Valgrind suppresion file for libgcrypt
-
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
-
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.
-
-{
- zlib inflateInit
- Memcheck:Cond
- fun:inflateReset2
- fun:inflateInit2_
- fun:_gnutls_comp_init
- fun:_gnutls_init_record_state
- fun:_gnutls_epoch_set_keys
- fun:_gnutls_write_connection_state_init
- fun:_gnutls_send_handshake_final
-}
-
-{
- libgcrypt1
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:gcry_pk_register_default
- fun:_gcry_pk_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt1-new
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:pk_register_default
- fun:_gcry_pk_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt2
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:gcry_md_register_default
- fun:_gcry_md_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt2-new
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:md_register_default
- fun:_gcry_md_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt3
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:gcry_cipher_register_default
- fun:_gcry_cipher_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt3-new
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_module_add
- fun:cipher_register_default
- fun:_gcry_cipher_init
- fun:global_init
- fun:_gcry_check_version
- fun:gcry_check_version
- fun:gnutls_global_init
-}
-
-{
- libgcrypt4
- Memcheck:Leak
- fun:malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_xmalloc
- fun:_gcry_xcalloc
- fun:initialize
- fun:_gcry_randomize
- fun:gcry_randomize
- fun:gc_pseudo_random
- fun:_gnutls_rnd_init
- fun:gnutls_global_init
-}
-
-{
- libgcrypt5
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_xmalloc
- fun:_gcry_xcalloc
- fun:initialize
- fun:_gcry_randomize
- fun:gcry_randomize
- fun:gc_pseudo_random
- fun:_gnutls_rnd_init
- fun:gnutls_global_init
-}
-
-{
- libgcrypt6
- Memcheck:Leak
- fun:malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_xmalloc
- fun:_gcry_xcalloc
- fun:initialize
- fun:_gcry_create_nonce
- fun:gcry_create_nonce
- fun:wrap_gcry_rnd_init
- fun:_gnutls_rnd_init
- fun:gnutls_global_init
-}
-
-{
- libgcrypt7
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_xmalloc
- fun:_gcry_xcalloc
- fun:initialize
- fun:_gcry_create_nonce
- fun:gcry_create_nonce
- fun:wrap_gcry_rnd_init
- fun:_gnutls_rnd_init
- fun:gnutls_global_init
-}
-
-{
- libgcrypt7-new
- Memcheck:Leak
- fun:malloc
- fun:_gcry_private_malloc
- fun:do_malloc
- fun:_gcry_malloc
- fun:_gcry_xmalloc
- fun:_gcry_xcalloc
- fun:initialize
- fun:_gcry_rngcsprng_create_nonce
- fun:_gcry_create_nonce
- fun:gcry_create_nonce
- fun:wrap_gcry_rnd_init
- fun:_gnutls_rnd_init
- fun:gnutls_global_init
-}
-
-{
- ignore p11 leaks
- Memcheck:Leak
- fun:calloc
- obj:*
- obj:*
- obj:*
- obj:*
- fun:p11_kit_initialize_registered
- fun:gnutls_pkcs11_init
- fun:gnutls_global_init
-}
-
-{
- nettle memxor3
- Memcheck:Addr8
- fun:memxor3
- obj:*
-}
-
-{
- nettle memxor
- Memcheck:Addr8
- fun:memxor
- obj:*
-}
-
-{
- memxor_different_alignment
- Memcheck:Addr8
- fun:memxor_different_alignment
- obj:*
-}
-
-{
- libidn-strlen
- Memcheck:Addr4
- fun:idna_to_ascii_4z
- fun:idna_to_ascii_8z
- fun:gnutls_x509_crt_check_hostname2
- ...
-}
-
-{
- libidn-strlen2
- Memcheck:Addr4
- fun:idna_to_ascii_4z
- fun:idna_to_ascii_8z
- fun:gnutls_server_name_set
- ...
-}
-
-{
- libidn-strlen2
- Memcheck:Addr4
- fun:idna_to_ascii_4z
- fun:idna_to_ascii_8z
- fun:gnutls_server_name_get
- ...
-}
-
-{
- bash leak
- Memcheck:Leak
- match-leak-kinds: definite
- fun:malloc
- fun:xmalloc
- fun:set_default_locale
- fun:main
-}