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 24, 2024
1 parent 54a1efd commit 5ed6c4b
Showing 1 changed file with 50 additions and 24 deletions.
74 changes: 50 additions & 24 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,35 +235,61 @@

if version.start_with?("3") && fips_mode?
make "install_sw install_ssldirs install_fips", env: env

if windows?
# Needed now that we switched to msys2 and have not figured out how to tell
# it how to statically link yet
dlls = [
"libcrypto-3-x64",
"libssl-3-x64",
]

dlls.each do |dll|
mingw = ENV["MSYSTEM"].downcase
# Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
# so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
if File.exist?(windows_path)
copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
else
raise "Cannot find required DLL needed for dynamic linking: #{windows_path}"
end
end

%w{ openssl }.each do |cmd|
copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
end
end
else
make "install", env: env
end

if windows?
# Needed now that we switched to msys2 and have not figured out how to tell
# it how to statically link yet
dlls = [
"libcrypto-3-x64",
"libssl-3-x64",
]

dlls.each do |dll|
mingw = ENV["MSYSTEM"].downcase
# Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
# so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
if File.exist?(windows_path)
copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
else
raise "Cannot find required DLL needed for dynamic linking: #{windows_path}"
end
end
# if windows?
# # Needed now that we switched to msys2 and have not figured out how to tell
# # it how to statically link yet
# dlls = [
# "libcrypto-3-x64",
# "libssl-3-x64",
# ]

# dlls.each do |dll|
# mingw = ENV["MSYSTEM"].downcase
# # Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
# # so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
# msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
# windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
# if File.exist?(windows_path)
# copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
# else
# raise "Cannot find required DLL needed for dynamic linking: #{windows_path}"
# end
# end

%w{ openssl }.each do |cmd|
copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
end
end
# %w{ openssl }.each do |cmd|
# copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
# end
# end

# if windows?
# command "find / -name openssl.exe"
Expand Down

0 comments on commit 5ed6c4b

Please sign in to comment.