From f4a12fc67689a830e9da1c87fd11afe5bc09deb3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 2 Jan 2020 21:06:40 +0100 Subject: Issue #1338 - Part 2: Update NSS to 3.48-RTM --- security/nss/tests/fips/fips.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'security/nss/tests/fips/fips.sh') diff --git a/security/nss/tests/fips/fips.sh b/security/nss/tests/fips/fips.sh index 4153e61aa..364930494 100755 --- a/security/nss/tests/fips/fips.sh +++ b/security/nss/tests/fips/fips.sh @@ -45,6 +45,8 @@ fips_init() } COPYDIR=${FIPSDIR}/copydir + CAVSDIR=${FIPSDIR}/cavs/tests + CAVSRUNDIR=${FIPSDIR}/cavs/scripts R_FIPSDIR=../fips P_R_FIPSDIR=../fips @@ -56,6 +58,8 @@ fips_init() mkdir -p ${FIPSDIR} mkdir -p ${COPYDIR} + mkdir -p ${CAVSDIR} + mkdir -p ${CAVSRUNDIR} cd ${FIPSDIR} } @@ -274,6 +278,31 @@ fips_140() fi } +fips_cavs() +{ + if [ "${CAVS_VECTORS}" = "all" ]; then + VECTORS= + elif [ "${CAVS_VECTORS}" = "" ]; then + VECTORS="aesgcm ecdsa hmac kas tls ike rng sha" + else + VECTORS=${CAVS_VECTORS} + fi + echo "Copying CAVS vectors" + cp -r ${QADIR}/fips/cavs_samples/* ${CAVSDIR} +# we copy the scripts to the test directory because they are designed to run from their +# own directory and we want any resulting core dumps to wind up in the test_results directory. + echo "Copying CAVS scripts" + cp -r ${QADIR}/fips/cavs_scripts/* ${CAVSRUNDIR} + echo "cd ${CAVSRUNDIR}" + cd ${CAVSRUNDIR} + echo "Running CAVS tests in ${CAVSDIR}" + ./runtest.sh ${CAVSDIR} run ${VECTORS} + echo "Verifying CAVS results in ${CAVSDIR}" + ./runtest.sh ${CAVSDIR} verify ${VECTORS} + RESULT=$? + html_msg $RESULT 0 "NIST CAVS test" "${CAVSDIR}" +} + ############################## fips_cleanup ############################ # local shell function to finish this script (no exit since it might be # sourced) @@ -289,5 +318,6 @@ fips_cleanup() fips_init fips_140 +fips_cavs fips_cleanup echo "fips.sh done" -- cgit v1.2.3