# 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 \
- cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \
+SUBDIRS = . cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \
slow dtls srp windows
if ENABLE_OPENPGP
data/ca-gnutls-keyid.pem data/ca-no-keyid.pem data/ca-weird-keyid.pem \
data/key-ca-1234.p8 data/key-ca-empty.p8 data/key-ca-null.p8 \
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
-dist_check_SCRIPTS = key-id pkcs8
+dist_check_SCRIPTS = key-id pkcs8 pkcs8-decode
-TESTS = key-id pkcs8
+TESTS = key-id pkcs8 pkcs8-decode
TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
LC_ALL="C" \
srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
DIFF="${DIFF:-diff -b -B}"
+TMPFILE=pkcs8-decode.$$.tmp
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
ret=0
-for p8 in 'encpkcs8.pem foobar' unencpkcs8.pem 'enc2pkcs8.pem baz'; do
+for p8 in "encpkcs8.pem foobar" "unencpkcs8.pem" "enc2pkcs8.pem baz"; do
set -- ${p8}
file="$1"
passwd="$2"
${VALGRIND} "${CERTTOOL}" --key-info --pkcs8 --password "${passwd}" \
- --infile "${srcdir}/${file}" | tee out >/dev/null
+ --infile "${srcdir}/data/${file}" | tee $TMPFILE >/dev/null
rc=$?
if test ${rc} != 0; then
- cat out
+ cat $TMPFILE
echo "PKCS8 FATAL ${p8}"
ret=1
else
echo "PKCS8 OK ${p8}"
fi
done
-rm -f out
+rm -f $TMPFILE
-for p8 in openssl-aes128.p8 openssl-aes256.p8 openssl-3des.p8; do
+for p8 in "openssl-aes128.p8" "openssl-aes256.p8" "openssl-3des.p8"; do
set -- ${p8}
file="$1"
passwd="$2"
${VALGRIND} "${CERTTOOL}" --p8-info --password "1234" \
- --infile "${srcdir}/${file}" | tee out >/dev/null
+ --infile "${srcdir}/data/${file}" | tee $TMPFILE >/dev/null
rc=$?
if test ${rc} != 0; then
- cat out
+ cat $TMPFILE
echo "PKCS8 FATAL ${p8}"
ret=1
fi
- ${DIFF} "${srcdir}/${p8}.txt" out
+ ${DIFF} "${srcdir}/data/${p8}.txt" $TMPFILE
rc=$?
if test ${rc} != 0; then
- cat out
+ cat $TMPFILE
echo "PKCS8 FATAL TXT ${p8}"
ret=1
fi
done
-rm -f out
+rm -f $TMPFILE
echo "PKCS8 DONE (rc $ret)"
exit $ret
+++ /dev/null
-## Process this file with automake to produce Makefile.in
-# Copyright (C) 2006, 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 = suppressions.valgrind encpkcs8.pem unencpkcs8.pem enc2pkcs8.pem \
- openssl-3des.p8 openssl-3des.p8.txt \
- openssl-aes128.p8 openssl-aes128.p8.txt \
- openssl-aes256.p8 openssl-aes256.p8.txt
-
-dist_check_SCRIPTS = pkcs8
-
-TESTS = pkcs8
-
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
- LC_ALL="C" \
- VALGRIND="$(VALGRIND)" \
- top_builddir="$(top_builddir)" \
- srcdir="$(srcdir)"