Skip to content

Commit 8273416

Browse files
authored
Merge pull request #666 from junaruga/wip/rake-print-fips
Rakefile: Print FIPS information in the `rake debug`.
2 parents fe7612f + 61434f6 commit 8273416

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ jobs:
180180
# TODO Fix other tests, and run all the tests on FIPS mode.
181181
- name: test on fips mode
182182
run: |
183-
ruby -I./lib -ropenssl \
183+
bundle exec rake debug &&
184+
ruby -I./lib -ropenssl \
184185
-e 'Dir.glob "./test/openssl/{test_fips.rb,test_pkey.rb}", &method(:require)'
185186
if: matrix.fips-enabled

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ task :debug do
4242
openssl_version_number_str = OpenSSL::OPENSSL_VERSION_NUMBER.to_s(16)
4343
libressl_version_number_str = (defined? OpenSSL::LIBRESSL_VERSION_NUMBER) ?
4444
OpenSSL::LIBRESSL_VERSION_NUMBER.to_s(16) : "undefined"
45+
providers_str = (defined? OpenSSL::Provider) ?
46+
OpenSSL::Provider.provider_names.join(", ") : "undefined"
4547
puts <<~MESSAGE
4648
OpenSSL::OPENSSL_VERSION: #{OpenSSL::OPENSSL_VERSION}
4749
OpenSSL::OPENSSL_LIBRARY_VERSION: #{OpenSSL::OPENSSL_LIBRARY_VERSION}
4850
OpenSSL::OPENSSL_VERSION_NUMBER: #{openssl_version_number_str}
4951
OpenSSL::LIBRESSL_VERSION_NUMBER: #{libressl_version_number_str}
52+
FIPS enabled: #{OpenSSL.fips_mode}
53+
Providers: #{providers_str}
5054
MESSAGE
5155
EOF
5256
ruby %Q(-I./lib -ropenssl -ve'#{ruby_code}')

0 commit comments

Comments
 (0)