Skip to content

Commit

Permalink
Improve build output
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Powell <thomas.powell@progress.com>
  • Loading branch information
tpowell-progress committed May 15, 2024
1 parent 877290c commit 8d50aaf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,25 +357,29 @@
end

if fips_mode?
puts "<<<<<<< FIPS MODE >>>>>>>"
puts "Validating FIPS_MODE build"
if windows?
puts "Reinstalling the openssl gem for Windows since it is installed with 1.1.1t for 3.1.x rubyinstaller"
command "#{install_dir}/embedded/bin/gem install openssl -- --with-openssl-dir=#{install_dir}/embedded", env: env.merge({"OPENSSL_FIPS" => "1"})

puts "Finding all the rubies installed and checking their fips_mode status"
find_command = %(
Get-ChildItem c:/opscode -name 'ruby.exe' -recurse | ForEach-Object {
& $_ -e "require 'openssl'; puts OpenSSL::OPENSSL_VERSION_NUMBER.to_s(16); puts OpenSSL::OPENSSL_LIBRARY_VERSION; OpenSSL.fips_mode = 1"
& $_ -e "require 'openssl'; puts OpenSSL::OPENSSL_VERSION_NUMBER.to_s(16); puts OpenSSL::OPENSSL_LIBRARY_VERSION; OpenSSL.fips_mode = 1; puts 'FIPS mode successfully activated for Ruby' + RUBY_VERSION"
}
Write-Output "done looking at rubies"
)
command find_command
else
find_command = %(
find /opt -name 'ruby' | grep 'bin/ruby' | while read ruby; do
echo "Checking $ruby"
sum $ruby
$ruby -v -e "require 'openssl'; puts OpenSSL::OPENSSL_VERSION_NUMBER.to_s(16); puts OpenSSL::OPENSSL_LIBRARY_VERSION; OpenSSL.fips_mode = 1"
$ruby -v -e "require 'openssl'; puts OpenSSL::OPENSSL_VERSION_NUMBER.to_s(16); puts OpenSSL::OPENSSL_LIBRARY_VERSION; OpenSSL.fips_mode = 1; puts 'FIPS mode successfully activated for Ruby '+ RUBY_VERSION"
done
echo "done looking at rubies"
)
command find_command
end
puts ">>>>>>> FIPS MODE <<<<<<<"
end
end

0 comments on commit 8d50aaf

Please sign in to comment.