From 951eb72ecb90efe4cfecf9f20a950a364005a43e Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 22 Dec 2021 17:30:20 -0600 Subject: [PATCH] fips-check.sh: update+streamline flavors -- add linuxv5-dev (checks out fips master same as old linuxv5-ready) , drop linuxv5-RC8, linuxv5-RC9, linuxv5-RC10, and the desupported/unbuildable fips-v3-ready; update linuxv5 and linuxv5-ready to use WCv5.0-RC11; use the term "flavor" consistently for the fips key (versus "version" or "platform"); cleanup to satisfy shellcheck. --- fips-check.sh | 185 ++++++++++++++++++++++---------------------------- 1 file changed, 80 insertions(+), 105 deletions(-) diff --git a/fips-check.sh b/fips-check.sh index b29b0a085..e31420e14 100755 --- a/fips-check.sh +++ b/fips-check.sh @@ -6,20 +6,20 @@ # may be advancing, they must work correctly with the last tested # copy of our FIPS approved code. # -# This should check out all the approved versions. The command line -# option selects the version. +# This should check out all the approved flavors. The command line +# option selects the flavor. # -# $ ./fips-check [version] [keep] +# $ ./fips-check [flavor] [keep] # -# - version: linux (default), ios, android, windows, freertos, linux-ecc, netbsd-selftest, linuxv2, fips-ready, stm32l4-v2 +# - flavor: linux (default), ios, android, windows, freertos, linux-ecc, netbsd-selftest, linuxv2, fips-ready, stm32l4-v2, linuxv5, linuxv5-ready, linuxv5-dev # # - keep: (default off) XXX-fips-test temp dir around for inspection # Usage() { cat <$CRYPT_SRC_PATH/fips_test.c + cp "${CRYPT_SRC_PATH}/fips_test.c" "${CRYPT_SRC_PATH}/fips_test.c.bak" + sed "s/^\".*\";/\"${NEWHASH}\";/" "${CRYPT_SRC_PATH}/fips_test.c.bak" >"${CRYPT_SRC_PATH}/fips_test.c" make clean fi fi @@ -468,7 +443,7 @@ fi # Clean up popd || exit 2 -if [ "x$KEEP" == "xno" ]; +if [ "$KEEP" == "no" ]; then - rm -rf $TEST_DIR + rm -rf "$TEST_DIR" fi