Parse new format to handle CRL info.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16618 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-01-19 18:17:58 +00:00
parent 9d0e8facf9
commit 510a550bc2

View File

@@ -41,20 +41,20 @@ echo "nist tests"
test -d "$nistdir" || exit 77 test -d "$nistdir" || exit 77
while read validate verify cert arg1 arg2 arg3 arg4 arg5 ; do while read id validate verify cert arg1 arg2 arg3 arg4 arg5 ; do
expr "$validate" : "#" > /dev/null && continue expr "$id" : "#" > /dev/null && continue
test "$validate" = "end" && break test "$id" = "end" && break
echo -n . echo -n .
if ./hxtool validate $nistdir/certs/$cert > /dev/null; then if ./hxtool validate $nistdir/certs/$cert > /dev/null; then
if test "$validate" = "f"; then if test "$validate" = "f"; then
echo "validate passed on fail: $cert" echo "validate passed on fail: $id $cert"
exit 1 exit 1
fi fi
else else
if test "$validate" = "p"; then if test "$validate" = "p"; then
echo "validate failed on pass: $cert" echo "validate failed on pass: $id $cert"
exit 1 exit 1
fi fi
fi fi
@@ -63,22 +63,25 @@ while read validate verify cert arg1 arg2 arg3 arg4 arg5 ; do
continue continue
fi fi
args="anchor:FILE:$nistdir/certs/TrustAnchorRootCertificate.crt" args=""
a=$(echo $arg1 | sed "s@basedir@$nistdir@") ; args="$args $a" a=$(echo $arg1 | sed "s@basedir@$nistdir@") ; args="$args $a"
a=$(echo $arg2 | sed "s@basedir@$nistdir@") ; args="$args $a" a=$(echo $arg2 | sed "s@basedir@$nistdir@") ; args="$args $a"
a=$(echo $arg3 | sed "s@basedir@$nistdir@") ; args="$args $a" a=$(echo $arg3 | sed "s@basedir@$nistdir@") ; args="$args $a"
a=$(echo $arg4 | sed "s@basedir@$nistdir@") ; args="$args $a" a=$(echo $arg4 | sed "s@basedir@$nistdir@") ; args="$args $a"
a=$(echo $arg5 | sed "s@basedir@$nistdir@") ; args="$args $a" a=$(echo $arg5 | sed "s@basedir@$nistdir@") ; args="$args $a"
if ./hxtool verify cert:FILE:$nistdir/certs/$cert $args > /dev/null ; then args="$args anchor:FILE:$nistdir/certs/TrustAnchorRootCertificate.crt"
args="$args crl:FILE:$nistdir/crls/TrustAnchorRootCRL.crl"
args="$args cert:FILE:$nistdir/certs/$cert"
if ./hxtool verify $args > /dev/null ; then
if test "$verify" = "f"; then if test "$verify" = "f"; then
echo "validate passed on fail: $cert" echo "validate passed on fail: $id $cert"
exit 1 exit 1
fi fi
else else
if test "$verify" = "p"; then if test "$verify" = "p"; then
echo "validate failed on pass: $cert" echo "validate failed on pass: $id $cert"
exit 1 exit 1
fi fi
fi fi