fix(fips.sh): repsect rd.fips.skipkernel

Support for this flag was broken in 4257798f8a
master
Brandon Sloane 2021-10-03 19:25:46 -04:00 committed by Harald Hoyer
parent 0b97790626
commit 5789abcbe0
1 changed files with 45 additions and 42 deletions

View File

@ -113,6 +113,8 @@ do_fips() {

KERNEL=$(uname -r)

if ! getarg rd.fips.skipkernel > /dev/null; then

fips_info "Checking integrity of kernel"
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
@ -166,6 +168,7 @@ do_fips() {

(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
fi
fi

fips_info "All initrd crypto checks done"