Skip to content

Commit

Permalink
Disable EMS check without changing /usr/share
Browse files Browse the repository at this point in the history
These changes disable EMS checks when FIPS is enabled by changing
configuration files in /etc.

The link /etc/pki/tls/fips_local.cnf that points to a configuration file
within the FIPS crypto policy is replaced with a regular file, and
Options=RHNoEnforceEMSinFIPS is added to the crypto_policy section in
/etc/pki/tls/openssl.cnf

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Sep 5, 2023
1 parent b8dfca6 commit a1671ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions virt-v2v/cold/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ container_image(
container_run_and_commit_layer(
name = "no-ems-in-fips",
commands = [
"touch /usr/share/crypto-policies/back-ends/FIPS/openssl_fips.config",
"echo -ne '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' >> /usr/share/crypto-policies/back-ends/FIPS/openssl_fips.config",
"echo -ne '[crypto_policy]\nOptions=RHNoEnforceEMSinFIPS' >> /usr/share/crypto-policies/back-ends/FIPS/opensslcnf.config",
"rm /etc/pki/tls/fips_local.cnf",
"echo -e '[fips_sect]\ntls1-prf-ems-check = 0\nactivate = 1' > /etc/pki/tls/fips_local.cnf",
"sed -i '/^\\[ crypto_policy \\]/a Options=RHNoEnforceEMSinFIPS' /etc/pki/tls/openssl.cnf",
],
image = ":virt-v2v-image.tar",
)
Expand Down

0 comments on commit a1671ed

Please sign in to comment.