mk_fipsbinary.sh 344 B

1234567891011121314151617
  1. #!/bin/bash
  2. BINARY_NAME=$1
  3. MAKE_FIPS_BINARY()
  4. {
  5. openssl dgst -sha256 -hmac 12345678 -binary -out \
  6. $BINARY_NAME.hmac $BINARY_NAME
  7. cat $BINARY_NAME $BINARY_NAME.hmac > $BINARY_NAME.digest
  8. cp -f $BINARY_NAME.digest $BINARY_NAME
  9. rm -f $BINARY_NAME.digest $BINARY_NAME.hmac
  10. }
  11. echo "Make kernel fips binary.."
  12. MAKE_FIPS_BINARY
  13. echo "Done."