From 90686a180230ad60d3aa35c58078c9e2833e423f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 1 Aug 2007 19:35:09 +0000 Subject: [PATCH] Adapt to new nist pkits framework. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21783 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/test_nist_pkcs12.in | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/hx509/test_nist_pkcs12.in b/lib/hx509/test_nist_pkcs12.in index f26a43d0d..2eeee368d 100644 --- a/lib/hx509/test_nist_pkcs12.in +++ b/lib/hx509/test_nist_pkcs12.in @@ -36,18 +36,31 @@ srcdir="@srcdir@" objdir="@objdir@" -nistdir=/sources/pki/nist/PKITS_data/pkcs12 pass="--pass=PASS:password" +nistdir=${objdir}/PKITS_data +nistzip=${srcdir}/data/PKITS_data.zip -echo "nist pkcs12 tests" - -test -d "$nistdir" || exit 77 +# nistzip is not distributed part of the distribution +test -f "$nistzip" || exit 77 stat="--statistic-file=${objdir}/statfile" hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" -for a in $nistdir/*.p12 ; do +if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then + exit 77 +fi +if ${hxtool} info | grep 'rand: not available' > /dev/null ; then + exit 77 +fi + +if [ ! -d "$nistdir" ] ; then + ( mkdir "$nistdir" && cd "$nistdir" && unzip "$nistzip" ) || { rm -rf "$nistdir" ; exit 1; } +fi + +echo "nist pkcs12 tests" + +for a in $nistdir/pkcs12/*.p12 ; do echo -n .