forked from wolfSSL/wolfssl
Merge pull request #1508 from kaleb-himes/FIPS-CHECK-SCRIPT
Fips check script
This commit is contained in:
@ -17,9 +17,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
function Usage() {
|
function Usage() {
|
||||||
echo "Usage: $0 [platform] [keep]"
|
printf '\n%s\n' "Usage: $0 [platform] [keep]"
|
||||||
echo "Where \"platform\" is one of linux (default), ios, android, windows, freertos, openrtos-3.9.2, linux-ecc, netbsd-selftest"
|
printf '%s\n\n' "Where \"platform\" is one of:"
|
||||||
echo "Where \"keep\" means keep (default off) XXX-fips-test temp dir around for inspection"
|
printf '\t%s\n' "linux (default)"
|
||||||
|
printf '\t%s\n' "ios"
|
||||||
|
printf '\t%s\n' "android"
|
||||||
|
printf '\t%s\n' "windows"
|
||||||
|
printf '\t%s\n' "freertos"
|
||||||
|
printf '\t%s\n' "openrtos-3.9.2"
|
||||||
|
printf '\t%s\n' "linux-ecc"
|
||||||
|
printf '\t%s\n' "netbsd-selftest"
|
||||||
|
printf '\t%s\n' "sgx"
|
||||||
|
printf '\t%s\n' "netos-7.6"
|
||||||
|
printf '\n%s\n\n' "Where \"keep\" means keep (default off) XXX-fips-test temp dir around for inspection"
|
||||||
|
printf '%s\n' "EXAMPLE:"
|
||||||
|
printf '%s\n' "---------------------------------"
|
||||||
|
printf '%s\n' "./fips-check.sh windows keep"
|
||||||
|
printf '%s\n\n' "---------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
LINUX_FIPS_VERSION=v3.2.6
|
LINUX_FIPS_VERSION=v3.2.6
|
||||||
@ -57,6 +71,21 @@ OPENRTOS_3_9_2_FIPS_REPO=git@github.com:wolfSSL/fips.git
|
|||||||
OPENRTOS_3_9_2_CTAO_VERSION=v3.6.1
|
OPENRTOS_3_9_2_CTAO_VERSION=v3.6.1
|
||||||
OPENRTOS_3_9_2_CTAO_REPO=git@github.com:cyassl/cyassl.git
|
OPENRTOS_3_9_2_CTAO_REPO=git@github.com:cyassl/cyassl.git
|
||||||
|
|
||||||
|
#NOTE: Does not include the SGX examples yet, update version once fipsv2 is
|
||||||
|
# finished and merge conflicts can be resolved. This will be tagged as
|
||||||
|
# v3.12.4.sgx-examples
|
||||||
|
#SGX_FIPS_VERSION=v3.12.4.sgx-examples
|
||||||
|
SGX_FIPS_VERSION=v3.6.6
|
||||||
|
SGX_FIPS_REPO=git@github.com:wolfSSL/fips.git
|
||||||
|
SGX_CTAO_VERSION=v3.12.4
|
||||||
|
SGX_CTAO_REPO=git@github.com:cyassl/cyassl.git
|
||||||
|
|
||||||
|
NETOS_7_6_FIPS_VERSION=v3.12.6
|
||||||
|
NETOS_7_6_FIPS_REPO=git@github.com:wolfSSL/fips.git
|
||||||
|
NETOS_7_6_CTAO_VERSION=v3.12.4
|
||||||
|
NETOS_7_6_CTAO_REPO=git@github.com:cyassl/cyassl.git
|
||||||
|
|
||||||
|
|
||||||
FIPS_SRCS=( fips.c fips_test.c )
|
FIPS_SRCS=( fips.c fips_test.c )
|
||||||
WC_MODS=( aes des3 sha sha256 sha512 rsa hmac random )
|
WC_MODS=( aes des3 sha sha256 sha512 rsa hmac random )
|
||||||
TEST_DIR=XXX-fips-test
|
TEST_DIR=XXX-fips-test
|
||||||
@ -131,6 +160,18 @@ netbsd-selftest)
|
|||||||
WC_SRC_PATH=wolfcrypt/src
|
WC_SRC_PATH=wolfcrypt/src
|
||||||
CAVP_SELFTEST_ONLY="yes"
|
CAVP_SELFTEST_ONLY="yes"
|
||||||
;;
|
;;
|
||||||
|
sgx)
|
||||||
|
FIPS_VERSION=$SGX_FIPS_VERSION
|
||||||
|
FIPS_REPO=$SGX_FIPS_REPO
|
||||||
|
CTAO_VERSION=$SGX_CTAO_VERSION
|
||||||
|
CTAO_REPO=$SGX_CTAO_REPO
|
||||||
|
;;
|
||||||
|
netos-7.6)
|
||||||
|
FIPS_VERSION=$NETOS_7_6_FIPS_VERSION
|
||||||
|
FIPS_REPO=$NETOS_7_6_FIPS_REPO
|
||||||
|
CTAO_VERSION=$NETOS_7_6_CTAO_VERSION
|
||||||
|
CTAO_REPO=$NETOS_7_6_CTAO_REPO
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
Usage
|
Usage
|
||||||
exit 1
|
exit 1
|
||||||
@ -152,14 +193,17 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# The following is temporary. We are using random.c from a separate release
|
# The following is temporary. We are using random.c from a separate release
|
||||||
if [ "x$CAVP_SELFTEST_ONLY" == "xno" ];
|
# This is forcefully overwriting any other checkout of the cyassl sources.
|
||||||
then
|
# Removing this as default behavior but leaving in comment to allow for easy
|
||||||
pushd old-tree
|
# reference if needed for any testing. Chris to remove when ready.
|
||||||
git checkout v3.6.0
|
#if [ "x$CAVP_SELFTEST_ONLY" == "xno" ];
|
||||||
popd
|
#then
|
||||||
cp old-tree/$WC_SRC_PATH/random.c $WC_SRC_PATH
|
# pushd old-tree
|
||||||
cp old-tree/$WC_INC_PATH/random.h $WC_INC_PATH
|
# git checkout v3.6.0
|
||||||
fi
|
# popd
|
||||||
|
# cp old-tree/$WC_SRC_PATH/random.c $WC_SRC_PATH
|
||||||
|
# cp old-tree/$WC_INC_PATH/random.h $WC_INC_PATH
|
||||||
|
#fi
|
||||||
|
|
||||||
# clone the FIPS repository
|
# clone the FIPS repository
|
||||||
git clone -b $FIPS_VERSION $FIPS_REPO fips
|
git clone -b $FIPS_VERSION $FIPS_REPO fips
|
||||||
|
Reference in New Issue
Block a user