Skip to content

Commit

Permalink
Patching openssl.cnf to add fips section when needed
Browse files Browse the repository at this point in the history
Signed-off-by: John McCrae <[email protected]>
  • Loading branch information
johnmccrae committed May 16, 2024
1 parent e2d0a42 commit dcecfc7
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dcecfc7

Please sign in to comment.