Skip to content

Commit

Permalink
Got it! have to adjust FIPS now, moving FIPS support back to the main…
Browse files Browse the repository at this point in the history
… openssl.rb file for v3 and laster in onnibus-software

Signed-off-by: John McCrae <[email protected]>
  • Loading branch information
johnmccrae committed Apr 25, 2024
1 parent e6b6b06 commit 1c77df6
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,33 +317,35 @@
if windows?
# Needed now that we switched to msys2 and have not figured out how to tell
# it how to statically link yet
if version.satisfies?("~> 3.0.0") && fips_mode?
require 'find'
puts "***************************"
puts "** Searching for Openssl **"
puts "***************************"
Find.find('openssl.exe') { |f| puts f }


files = [
"libcrypto-3-x64.dll",
"libssl-3-x64.dll",
"openssl.exe",
]

files.each do |file|
# mingw = ENV["MSYSTEM"].downcase
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
windows_path = "#{msys_path}/usr/local/bin/#{file}"
puts "checking for this file: #{windows_path}"

if File.exist?(windows_path)
puts "writing openssl file #{file} to the /embedded directory"
copy windows_path, "#{install_dir}/embedded/bin/#{file}"
build do
if version.satisfies?("~> 3.0.0") && fips_mode?
require 'find'
puts "***************************"
puts "** Searching for Openssl **"
puts "***************************"
Find.find('openssl.exe') { |f| puts f }


files = [
"libcrypto-3-x64.dll",
"libssl-3-x64.dll",
"openssl.exe",
]

files.each do |file|
# mingw = ENV["MSYSTEM"].downcase
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
windows_path = "#{msys_path}/usr/local/bin/#{file}"
puts "checking for this file: #{windows_path}"

if File.exist?(windows_path)
puts "writing openssl file #{file} to the /embedded directory"
copy windows_path, "#{install_dir}/embedded/bin/#{file}"
end
end
end
end

%w{ erb gem irb rdoc ri bundle }.each do |cmd|
copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
end
Expand Down

0 comments on commit 1c77df6

Please sign in to comment.