]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: moved pkcs12 tests into cert-certs/ subdir
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 28 Jul 2016 10:59:33 +0000 (12:59 +0200)
committerGitLab <gitlab@gitlab.com>
Thu, 28 Jul 2016 13:19:16 +0000 (13:19 +0000)
13 files changed:
tests/Makefile.am
tests/cert-tests/Makefile.am
tests/cert-tests/data/cert-ca.p12 [moved from tests/pkcs12-decode/cert-ca.p12 with 100% similarity]
tests/cert-tests/data/client.p12 [moved from tests/pkcs12-decode/client.p12 with 100% similarity]
tests/cert-tests/data/noclient.p12 [moved from tests/pkcs12-decode/noclient.p12 with 100% similarity]
tests/cert-tests/data/pkcs12_2certs.p12 [moved from tests/pkcs12-decode/pkcs12_2certs.p12 with 100% similarity]
tests/cert-tests/data/pkcs12_5certs.p12 [moved from tests/pkcs12-decode/pkcs12_5certs.p12 with 100% similarity]
tests/cert-tests/data/sha256.p12 [moved from tests/pkcs12-decode/sha256.p12 with 100% similarity]
tests/cert-tests/data/test-null.p12 [moved from tests/pkcs12-decode/test-null.p12 with 100% similarity]
tests/cert-tests/data/unclient.p12 [moved from tests/pkcs12-decode/unclient.p12 with 100% similarity]
tests/cert-tests/pkcs12 [moved from tests/pkcs12-decode/pkcs12 with 92% similarity]
tests/pkcs12-decode/Makefile.am [deleted file]
tests/pkcs12-decode/suppressions.valgrind [deleted file]

index 0c0e08c9b8a9c6542870d1405008e285bcc3db78..16573989bd534d1c9dffb7208ff7ae755775dc8a 100644 (file)
@@ -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
 
index 5b520eb89cefbcf48b64dd45e4ea700211db5c7c..e9cfa171e875a5cf78315b20670e244f006b5dde 100644 (file)
@@ -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
similarity index 92%
rename from tests/pkcs12-decode/pkcs12
rename to tests/cert-tests/pkcs12
index e41afc9246471db6485b51ba8ee1fe684d6b347f..c52b09b06c22b075a53d7c10a8ba3d60ffbf4068 100755 (executable)
@@ -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 (file)
index f21a82e..0000000
+++ /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 (file)
index 47e4cda..0000000
+++ /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
-}