diff --git a/ipatests/pytest_ipa/integration/fips.py b/ipatests/pytest_ipa/integration/fips.py index 694ec8a99..b33aa91b1 100644 --- a/ipatests/pytest_ipa/integration/fips.py +++ b/ipatests/pytest_ipa/integration/fips.py @@ -68,3 +68,9 @@ def disable_userspace_fips(host): # sanity check assert not is_fips_enabled(host) host.run_command(["openssl", "md5", "/dev/null"]) + + +def enable_crypto_subpolicy(host, subpolicy): + result = host.run_command(["update-crypto-policies", "--show"]) + policy = result.stdin_text.strip() + ":" + subpolicy + host.run_command(["update-crypto-policies", "--set", policy]) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 7e1b7c24d..13d84e23f 100755 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -66,6 +66,7 @@ from .env_config import env_to_script from .host import Host from .firewall import Firewall from .resolver import ResolvedResolver +from .fips import is_fips_enabled, enable_crypto_subpolicy logger = logging.getLogger(__name__) @@ -362,6 +363,8 @@ def install_master(host, setup_dns=True, setup_kra=False, setup_adtrust=False, if setup_adtrust: args.append('--setup-adtrust') fw_services.append("freeipa-trust") + if is_fips_enabled(host): + enable_crypto_subpolicy(host, "AD-SUPPORT") if external_ca: args.append('--external-ca')