From f7235819d2a5a13a10733c2ada19be970a7d7bf0 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 24 Nov 2014 12:50:55 -0800 Subject: [PATCH] bugfix in the FIPS check script --- autogen.sh | 2 +- fips-check.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 9698b0e0f..f0042765d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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 diff --git a/fips-check.sh b/fips-check.sh index 282e0d86e..04e74469f 100755 --- a/fips-check.sh +++ b/fips-check.sh @@ -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