summaryrefslogtreecommitdiffstats
path: root/security/nss/tests/fips/fips.sh
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:06:40 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:06:40 +0100
commitf4a12fc67689a830e9da1c87fd11afe5bc09deb3 (patch)
tree211ae0cd022a6c11b0026ecc7761a550c584583c /security/nss/tests/fips/fips.sh
parentf7d30133221896638f7bf4f66c504255c4b14f48 (diff)
downloadUXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar
UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.gz
UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.lz
UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.tar.xz
UXP-f4a12fc67689a830e9da1c87fd11afe5bc09deb3.zip
Issue #1338 - Part 2: Update NSS to 3.48-RTM
Diffstat (limited to 'security/nss/tests/fips/fips.sh')
-rwxr-xr-xsecurity/nss/tests/fips/fips.sh30
1 files changed, 30 insertions, 0 deletions
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"