Skip to content

Commit

Permalink
What is it with Openssl.so? Why you so crabby?
Browse files Browse the repository at this point in the history
Signed-off-by: John McCrae <john.mccrae@progress.com>
  • Loading branch information
johnmccrae committed May 14, 2024
1 parent 9f9f27d commit 625d7c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,14 @@
# fips_cnf_file = "/usr/local/ssl/fipsmodule.cnf"
# fips_module_file = "/usr/local/lib64/ossl-modules/fips.#{windows? ? "dll" : "so"}"

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

fips_cnf_file = "#{install_dir}/embedded/ssl/fipsmodule.cnf"
fips_module_file = "#{install_dir}/embedded/lib/ossl-modules/fips.#{windows? ? "dll" : "so"}"

# Running the `openssl fipsinstall -out fipsmodule.cnf -module fips.so` command
command "#{install_dir}/embedded/bin/openssl fipsinstall -out #{fips_cnf_file} -module #{fips_module_file}"
# openssl.exe does not exists in /opscode/chef/embedded/bin yet. We call it from where it was built.
command "#{msys_path}/usr/local/bin/openssl fipsinstall -out #{fips_cnf_file} -module #{fips_module_file}"

# Running the `openssl fipsinstall -out fipsmodule.cnf -module fips.so` command
# not needed since previous commands already created those files
Expand All @@ -242,7 +245,7 @@
command "sed -i -e 's|# .include fipsmodule.cnf|.include #{fips_cnf_file}|g' #{install_dir}/embedded/ssl/openssl.cnf"
command "sed -i -e 's|# fips = fips_sect|fips = fips_sect|g' #{install_dir}/embedded/ssl/openssl.cnf"
command "echo '>>> fipsmodule.cnf'; cat #{fips_cnf_file}"
command "#{windows? ? 'Perl.exe' : ''} ./util/wrap.pl -fips #{install_dir}/embedded/bin/openssl list -provider-path providers -provider fips -providers"
command "#{windows? ? 'Perl.exe' : ''} ./util/wrap.pl -fips #{msys_path}/usr/local/bin/openssl list -provider-path providers -provider fips -providers"

# for *nix OS's use the below
# command "sed -i -e 's|# .include fipsmodule.cnf|.include #{fips_cnf_file}|g' #{install_dir}/embedded/ssl/openssl.cnf"
Expand Down

0 comments on commit 625d7c8

Please sign in to comment.