Skip to content

Commit

Permalink
Tweaking openssl to match chef-18
Browse files Browse the repository at this point in the history
Signed-off-by: John <[email protected]>
  • Loading branch information
johnmccrae committed May 28, 2024
1 parent f593510 commit 40e15ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,12 @@
command "curl https://rubygems.org/downloads/openssl-#{openssl_gem_version}.gem --output openssl-#{openssl_gem_version}.gem"

# add OPENSSL_FIPS to the environment _if_ fips is active
# h['MY_VAR'].nil? ? 'foobar' : h['MY_VAR']
fips_env=fips_mode? ? env.merge({"OPENSSL_FIPS" => "1"}) : env
gem_path = ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"] || '/opt/chef'
command "#{gem_path}/embedded/bin/gem install openssl-#{openssl_gem_version}.gem --no-document -- --with-openssl-dir=#{install_dir}/embedded", env: fips_env
gem_path = ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"].nil? ? '/opt/omnibus-toolchain/bin' : ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]
command "#{gem_path}/gem install openssl-#{openssl_gem_version}.gem --no-document -- --with-openssl-dir=#{install_dir}/embedded", env: fips_env

command "#{gem_path}/embedded/bin/gem info openssl"
command "#{gem_path}/gem info openssl"
command "#{install_dir}/embedded/bin/openssl list -provider-path providers -provider fips -providers"
end

Expand Down

0 comments on commit 40e15ea

Please sign in to comment.