summaryrefslogtreecommitdiffstats
path: root/modules.d/01fips
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/01fips')
-rwxr-xr-xmodules.d/01fips/fips.sh8
-rwxr-xr-xmodules.d/01fips/module-setup.sh2
2 files changed, 4 insertions, 6 deletions
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
index c81c2a6..2c7b2e3 100755
--- a/modules.d/01fips/fips.sh
+++ b/modules.d/01fips/fips.sh
@@ -94,16 +94,14 @@ fips_load_crypto() {
local _module
local _found
- read -d '' -r FIPSMODULES < /etc/fipsmodules
-
fips_info "Loading and integrity checking all crypto modules"
- for _module in $FIPSMODULES; do
+ while read -r _module; do
if [ "$_module" != "tcrypt" ]; then
if ! nonfatal_modprobe "${_module}" 2> /tmp/fips.modprobe_err; then
# check if kernel provides generic algo
_found=0
while read -r _k _ _v || [ -n "$_k" ]; do
- [ "$_k" != "name" -a "$_k" != "driver" ] && continue
+ [ "$_k" != "name" ] && [ "$_k" != "driver" ] && continue
[ "$_v" != "$_module" ] && continue
_found=1
break
@@ -111,7 +109,7 @@ fips_load_crypto() {
[ "$_found" = "0" ] && cat /tmp/fips.modprobe_err >&2 && return 1
fi
fi
- done
+ done < /etc/fipsmodules
if [ -f /etc/fips.conf ]; then
mkdir -p /run/modprobe.d
cp /etc/fips.conf /run/modprobe.d/fips.conf
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 83fcd56..1e0c9d0 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -30,7 +30,7 @@ installkernel() {
_fipsmodules+="ecb cbc ctr xts gcm ccm authenc hmac cmac ofb cts "
# Compression algs:
- _fipsmodules+="deflate lzo zlib "
+ _fipsmodules+="deflate lzo "
# PRNG algs:
_fipsmodules+="ansi_cprng "