Adjust ssl-enum-ciphers-test for rhel10 and fedora

fips-mode-setup is not available on newer fedoras and rhel10
This commit is contained in:
František Hrdina 2025-03-19 13:15:02 +01:00
commit c98672ae7f

View file

@ -13,7 +13,12 @@ PORT="12345"
rlJournalStart
if [ "$REBOOTCOUNT" -eq 0 ]; then
rlPhaseStartSetup "Enable fips"
rlRun "fips-mode-setup --enable" 0 "Enable fips"
if rlIsFedora '>=41'|| rlIsRHELLike '>=10'; then
rlRun "grubby --update-kernel=ALL --args=\"fips=1\""
else
rlRun "fips-mode-setup --enable" 0 "Enable fips"
fi
rlLog "Rebooting"
tmt-reboot
rlPhaseEnd
@ -65,7 +70,13 @@ EOL
rlPhaseEnd
rlPhaseStartCleanup "Disable fips"
rlRun "fips-mode-setup --disable" 0 "Disable fips"
rlPhaseStartSetup "Enable fips"
if rlIsFedora '>=41' || rlIsRHELLike '>=10'; then
rlRun "grubby --update-kernel=ALL --args=\"fips=0\""
else
rlRun "fips-mode-setup --disable" 0 "Disable fips"
fi
rlLog "Rebooting"
tmt-reboot
rlPhaseEnd