From dc0e8d8d7e5646b91d8576dca4f4b2a6ac499370 Mon Sep 17 00:00:00 2001 From: John McCrae Date: Wed, 15 May 2024 09:27:47 -0700 Subject: [PATCH] Patching openssl.cnf to add fips section when needed Signed-off-by: John McCrae --- .../openssl/openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch | 4 ++-- config/software/openssl.rb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/patches/openssl/openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch b/config/patches/openssl/openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch index c5367a9fc..a2db58152 100644 --- a/config/patches/openssl/openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch +++ b/config/patches/openssl/openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch @@ -1,7 +1,7 @@ -diff --git "a/usr/local/ssl/openssl.cnf" "/c/msys64/usr/local/ssl/openssl.cnf" +diff --git "a/usr/local/ssl/openssl.cnf" "b/usr/local/ssl/openssl.cnf" index 5340de2..6daaccc 100644 --- "a/usr/local/ssl/openssl.cnf" -+++ "/c/msys64/usr/local/ssl/openssl.cnf" ++++ "b/usr/local/ssl/openssl.cnf" @@ -75,6 +75,11 @@ activate = 1 [legacy_sect] activate = 1 diff --git a/config/software/openssl.rb b/config/software/openssl.rb index 855520e30..e993205fb 100644 --- a/config/software/openssl.rb +++ b/config/software/openssl.rb @@ -242,7 +242,9 @@ # Updating the openssl.cnf file to enable the fips provider command "sed -i -e 's|# .include fipsmodule.cnf|.include #{fips_cnf_file}|g' #{msys_path}/usr/local/ssl/openssl.cnf" command "sed -i -e 's|# fips = fips_sect|fips = fips_sect|g' #{msys_path}/usr/local/ssl/openssl.cnf" - patch source: "openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch", env: env + patch_env = env.dup + patch_env["PATH"] = "/c/msys64/usr/local/ssl:#{env["PATH"]}" if windows? + patch source: "openssl-3.0.0-add-fips-sect-to-openssl.cnf.patch", env: patch_env # command "sed -i '76 i\\ # \[fips_sect\] \\ # activate = 1 \\