hx509: Let test_nist keep going on failure

Instead of reporting the first failure and exiting, it should report all
failures and then exit(1).
This commit is contained in:
Nicolas Williams
2021-02-22 00:20:56 -06:00
parent 22b8c3d448
commit a775937e2e

View File

@@ -60,6 +60,7 @@ if [ ! -d "$nistdir" ] ; then
{ rm -rf "$nistdir" ; exit 1; }
fi
ec=0
while read id verify cert arg1 arg2 arg3 arg4 arg5 ; do
expr "$id" : "#" > /dev/null && continue
@@ -98,14 +99,14 @@ while read id verify cert arg1 arg2 arg3 arg4 arg5 ; do
if ${hxtool} verify --time=2008-05-20 $args > /dev/null; then
if test "$verify" = "f"; then
echo ${hxtool} verify --time=2008-05-20 $args
echo "verify passed on fail: $id $cert"
exit 1
fi
else
if test "$verify" = "p"; then
echo "verify failed on pass: $id $cert"
exit 1
ec=1
fi
elif test "$verify" = "p"; then
echo ${hxtool} verify --time=2008-05-20 $args
echo "verify failed on pass: $id $cert"
ec=1
fi
done < $srcdir/data/nist-data
@@ -113,4 +114,4 @@ done < $srcdir/data/nist-data
echo "done!"
exit 0
exit $ec