From 533ec999d8011cb56a65e83428e219bd5f10a198 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:46:09 -0700 Subject: [PATCH] Build the OpenSSL FIPS provider on FIPS platforms The FIPS agent packages have taken fips.so from the separate openssl-fips repository, where its version is pinned apart from the library and can fall behind it. This was done intentionally, because only certain OpenSSL FIPS module versions are officially "certified". However, these versions become out of date very quickly and can accumulate CVEs. For example, the only non-EOL "certified" FIPS module version is 3.1.2, but this contains several CVEs. A 3.5 version is currently undergoing certification, but it will run into the same issue in time. Instead, because we care more about remediating CVEs than the official certification, this builds the FIPS provider together with the library on FIPS platforms, removing the need for the openssl-fips component in the openvox packaging repo. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> --- configs/components/openssl-3.0.rb | 7 ++++++- configs/components/openssl-3.5.rb | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configs/components/openssl-3.0.rb b/configs/components/openssl-3.0.rb index 06965826..ff899af0 100644 --- a/configs/components/openssl-3.0.rb +++ b/configs/components/openssl-3.0.rb @@ -94,6 +94,7 @@ else configure_flags << 'no-legacy' << 'no-md4' end + configure_flags << 'enable-fips' if platform.is_fips? # Patches for OpenSSL CVE fixes released in September, 2026 # Sourced from the debian/bookworm branch of: @@ -148,8 +149,12 @@ install_commands = [] # Skip man and html docs - install_commands << "#{platform[:make]} #{install_prefix} install_sw install_ssldirs" + install_targets = 'install_sw install_ssldirs' + install_targets += ' install_fips' if platform.is_fips? + install_commands << "#{platform[:make]} #{install_prefix} #{install_targets}" install_commands << "rm -f #{settings[:prefix]}/bin/c_rehash" + # The agent package generates fipsmodule.cnf on the host it is installed on + install_commands << "rm -f #{settings[:prefix]}/ssl/fipsmodule.cnf" if platform.is_fips? pkg.install do install_commands diff --git a/configs/components/openssl-3.5.rb b/configs/components/openssl-3.5.rb index 59a320f6..981d5f37 100644 --- a/configs/components/openssl-3.5.rb +++ b/configs/components/openssl-3.5.rb @@ -87,6 +87,7 @@ else configure_flags << 'no-legacy' << 'no-md4' << 'no-des' end + configure_flags << 'enable-fips' if platform.is_fips? # Individual projects may provide their own openssl configure flags: project_flags = settings[:openssl_extra_configure_flags] || [] @@ -117,8 +118,12 @@ install_commands = [] # Skip man and html docs - install_commands << "#{platform[:make]} #{install_prefix} install_sw install_ssldirs" + install_targets = 'install_sw install_ssldirs' + install_targets += ' install_fips' if platform.is_fips? + install_commands << "#{platform[:make]} #{install_prefix} #{install_targets}" install_commands << "rm -f #{settings[:prefix]}/bin/c_rehash" + # The agent package generates fipsmodule.cnf on the host it is installed on + install_commands << "rm -f #{settings[:prefix]}/ssl/fipsmodule.cnf" if platform.is_fips? pkg.install do install_commands