From dcecfc799d07624b33a3937e4f71713e319d9f01 Mon Sep 17 00:00:00 2001 From: John McCrae Date: Thu, 16 May 2024 11:18:43 -0700 Subject: [PATCH] Patching openssl.cnf to add fips section when needed Signed-off-by: John McCrae --- config/software/openssl.rb | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/config/software/openssl.rb b/config/software/openssl.rb index bb33ae70f..f05f51209 100644 --- a/config/software/openssl.rb +++ b/config/software/openssl.rb @@ -222,11 +222,14 @@ msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin" command "echo '****************************************'" - command "echo 'My MSYS path is: #{msys_path}'" + command "echo 'My MSYS path was: #{msys_path}'" command "echo '****************************************'" - if msys_path == "c:msys64" + if (msys_path == 'c:msys64') || (msys_path == 'c:\msys64') msys_path = "c:/msys64" end + command "echo '****************************************'" + command "echo 'My MSYS path is now: #{msys_path}'" + command "echo '****************************************'" # running the make install_fips step to install the FIPS provider # make "install_fips", env: env @@ -316,17 +319,21 @@ # if windows? - # # %w{ openssl.so }.each do |file| - # # delete "#{install_dir}/embedded/bin/#{file}" - # # end + # %w{ openssl.so }.each do |file| + # delete "#{install_dir}/embedded/bin/#{file}" + # end - # %w{ openssl.so libcrypto-3-x64.dll libssl-3-x64.dll openssl.exe }.each do |file| - # copy "#{msys_path}/usr/local/bin/#{file}", "#{install_dir}/embedded/bin/#{file}" - # end + %w{ libcrypto-3-x64.dll libssl-3-x64.dll openssl.exe }.each do |file| + copy "#{msys_path}/usr/local/bin/#{file}", "#{install_dir}/embedded/bin/#{file}" + end - # %w{ legacy.dll fips.dll }.each do |file| - # copy "#{msys_path}/usr/local/lib64/ossl-modules/#{file}", "#{install_dir}/embedded/bin/#{file}" - # end + %w{ legacy.dll fips.dll }.each do |file| + copy "#{msys_path}/usr/local/lib64/ossl-modules/#{file}", "#{install_dir}/embedded/bin/#{file}" + end + + %w{ openssl.cnf fipsmodule.cnf }.each do |file| + copy "#{msys_path}/usr/local/ssl/#{file}", "#{install_dir}/embedded/bin/#{file}" + end # # # Needed now that we switched to msys2 and have not figured out how to tell # # # it how to statically link yet