libkcapi/fipshmac-openssl.sh
Ondrej Mosnacek 7393454a2f Enable building on old kernels
This adds scripts that mock sha512hmac and fipshmac using openssl. These
are used instead of the built hashers to hash libkcapi binaries on
kernels that don't suport the userspace Crypto API interface properly
(e.g. RHEL-7 kernels).

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
2020-04-30 08:35:22 +02:00

10 lines
228 B
Bash

#!/bin/bash
# Mocks fipshmac using the openssl tool.
# Only for use during RPM build.
[ "$1" = '-d' ] || exit 1
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP -hex "$3" | cut -f 2 -d ' ' \
>"$2/$(basename "$3").hmac"