2024-08-20 21:48:33 +03:00
|
|
|
#!/bin/sh
|
2019-06-25 02:01:05 +03:00
|
|
|
|
|
|
|
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
|
2020-05-13 03:27:56 +03:00
|
|
|
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
|
|
|
|
sed "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c.bak >wolfcrypt/src/fips_test.c
|
2019-06-25 02:01:05 +03:00
|
|
|
fi
|