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 <john.mccrae@progress.com>
  • Loading branch information
johnmccrae committed Apr 25, 2024
1 parent b851b93 commit 8bb24fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 37 deletions.
9 changes: 7 additions & 2 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@
if version.start_with?("3") && fips_mode?
make "install_sw install_ssldirs install_fips", env: env

# if windows?
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"

if windows?
%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
# # Needed now that we switched to msys2 and have not figured out how to tell
# # it how to statically link yet
# dlls = [
Expand All @@ -258,7 +263,7 @@
# %w{ openssl }.each do |cmd|
# copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
# end
# end
end
else
make "install", env: env
end
Expand Down
37 changes: 2 additions & 35 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@
# environment in omnibus-toolchain would probably need to look a little more identical to the devkit.
env["CC"] = "gcc"
env["CFLAGS"] = "-I#{install_dir}/embedded/include -DFD_SETSIZE=2048"
if windows_arch_i386?
env["CFLAGS"] << " -m32 -march=i686 -O3"
else
env["CFLAGS"] << " -m64 -march=x86-64 -O3"
end
env["CFLAGS"] << " -m64 -march=x86-64 -O3"
env["CPPFLAGS"] = env["CFLAGS"]
env["CXXFLAGS"] = env["CFLAGS"]
else # including linux
Expand Down Expand Up @@ -317,36 +313,7 @@
if windows?
# Needed now that we switched to msys2 and have not figured out how to tell
# it how to statically link yet
# 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 libcrypto-3-x64.dll libssl-3-x64.dll openssl.exe }.each do |cmd|
%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 8bb24fc

Please sign in to comment.