aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mk_fipsbinary.sh
blob: 3ec6df5e3eb909d43c1b51ab0406b0e3d094c08e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
BINARY_NAME=$1
MAKE_FIPS_BINARY()
{
	openssl dgst -sha256 -hmac 12345678 -binary -out \
		$BINARY_NAME.hmac $BINARY_NAME
	cat $BINARY_NAME $BINARY_NAME.hmac > $BINARY_NAME.digest
	cp -f $BINARY_NAME.digest $BINARY_NAME
	rm -f $BINARY_NAME.digest $BINARY_NAME.hmac
}

echo "Make kernel fips binary.."
MAKE_FIPS_BINARY
echo "Done."