bugfix in the FIPS check script

pull/1/head
John Safranek 2014-11-24 12:50:55 -08:00
parent a352908c61
commit f7235819d2
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ fi
# Set HAVE_FIPS_SOURCE to 1 in your .profile if you have access to the FIPS
# repository. (Hint: If you don't work for us, you don't. This will fail.)
if test $HAVE_FIPS_SOURCE -a ! -d ./fips; then
if test -n "$HAVE_FIPS_SOURCE" -a ! -d ./fips; then
git clone git@github.com:wolfSSL/fips.git
SAVEDIR=`pwd`
cd ./ctaocrypt/src

View File

@ -45,7 +45,9 @@ make
[ $? -ne 0 ] && echo -e "\n\nMake failed. Debris left for analysis." && exit 1
NEWHASH=`./ctaocrypt/test/testctaocrypt | sed -n 's/hash = \(.*\)/\1/p'`
sed -i.bak "s/^\".*\";/\"${NEWHASH}\";/" $WC_SRC_PATH/fips_test.c
if [ -n "$NEWHASH" ]; then
sed -i.bak "s/^\".*\";/\"${NEWHASH}\";/" $WC_SRC_PATH/fips_test.c
fi
make test
[ $? -ne 0 ] && echo -e "\n\nTest failed. Debris left for analysis." && exit 1