summaryrefslogtreecommitdiff
path: root/include/ruby/internal/arithmetic
diff options
context:
space:
mode:
authorJun Aruga <jaruga@redhat.com>2023-03-16 21:36:43 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-05-19 09:25:10 +0900
commit678d41bc51fe31834eec0b653ba0e47de5420aa0 (patch)
tree636a9ced336880ff2aaeddf72cb759e08c401b18 /include/ruby/internal/arithmetic
parent741a3bd5a547324be0d267bd77c3f5f2415c8c60 (diff)
[ruby/openssl] Implement FIPS functions on OpenSSL 3.
This commit is to implement the `OpenSSL::OPENSSL_FIPS`, `ossl_fips_mode_get` and `ossl_fips_mode_set` to pass the test `test/openssl/test_fips.rb`. It seems that the `OPENSSL_FIPS` macro is not used on the FIPS mode case any more, and some FIPS related APIs also were removed in OpenSSL 3. See the document <https://github.com/openssl/openssl/blob/master/doc/man7/migration_guide.pod#removed-fips_mode-and-fips_mode_set> the section OPENSSL 3.0 > Main Changes from OpenSSL 1.1.1 > Other notable deprecations and changes - Removed FIPS_mode() and FIPS_mode_set() . The `OpenSSL::OPENSSL_FIPS` returns always true in OpenSSL 3 because the used functions `EVP_default_properties_enable_fips` and `EVP_default_properties_is_fips_enabled` works with the OpenSSL installed without FIPS option. The `TEST_RUBY_OPENSSL_FIPS_ENABLED` is set on the FIPS mode case on the CI. Because I want to test that the `OpenSSL.fips_mode` returns the `true` or 'false' surely in the CI. You can test the FIPS mode case by setting `TEST_RUBY_OPENSSL_FIPS_ENABLED` on local too. Right now I don't find a better way to get the status of the FIPS mode enabled or disabled for this purpose. I am afraid of the possibility that the FIPS test case is unintentionally skipped. I also replaced the ambiguous "returns" with "should return" in the tests. https://github.com/ruby/openssl/commit/c5b2bc1268
Diffstat (limited to 'include/ruby/internal/arithmetic')
0 files changed, 0 insertions, 0 deletions