Skip to content

Commit

Permalink
feat(fips): add progress messages
Browse files Browse the repository at this point in the history
This allows to better understand at what point a FIPS integrity test failed.

Signed-off-by: Raymund Will <rw@suse.com>
  • Loading branch information
aafeijoo-suse authored and johannbg committed Feb 13, 2023
1 parent 1fabbb6 commit 68d0653
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules.d/01fips/fips-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif getarg boot= > /dev/null; then
. /sbin/fips.sh
fips_info "fips-boot: start"
if mount_boot; then
do_fips || die "FIPS integrity test failed"
fi
fips_info "fips-boot: done!"
fi
2 changes: 2 additions & 0 deletions modules.d/01fips/fips-load-crypto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
else
. /sbin/fips.sh
fips_info "fips-load-crypto: start"
fips_load_crypto || die "FIPS integrity test failed"
fips_info "fips-load-crypto: done!"
fi
2 changes: 2 additions & 0 deletions modules.d/01fips/fips-noboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif ! [ -f /tmp/fipsdone ]; then
. /sbin/fips.sh
fips_info "fips-noboot: start"
mount_boot
do_fips || die "FIPS integrity test failed"
fips_info "fips-noboot: done!"
fi

0 comments on commit 68d0653

Please sign in to comment.