From 6ab3f8393f48b931c8236f5086728ae6106985ad 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:25 +0000 Subject: [PATCH] Adapt to new nist pkits framework. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21784 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/test_nist_cert.in | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/hx509/test_nist_cert.in b/lib/hx509/test_nist_cert.in index 3a7c84afd..7a8d8812e 100644 --- a/lib/hx509/test_nist_cert.in +++ b/lib/hx509/test_nist_cert.in @@ -36,14 +36,27 @@ srcdir="@srcdir@" objdir="@objdir@" -nistdir=/sources/pki/nist/PKITS_data +nistdir=${objdir}/PKITS_data +nistzip=${srcdir}/data/PKITS_data.zip -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}" +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 + if ${hxtool} validate DIR:$nistdir/certs > /dev/null; then : else