You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS/FreeRTOS-Plus/Source/WolfSSL/fips-hash.sh

21 lines
401 B
Bash

#!/bin/bash
if test ! -x ./wolfcrypt/test/testwolfcrypt
then
echo "fips-hash: wolfCrypt test missing"
exit 1
fi
if test ! -s ./wolfcrypt/src/fips_test.c
then
echo "fips-hash: fips_test.c missing"
exit 1
fi
NEWHASH=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
if test -n "$NEWHASH"
then
sed -i.bak "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c
fi