[ruby/openssl] pkey/dh: tweak break tests for AWS-LC

We reecently tweaked some break tests in test_pkey_dh.rb due to
different behavior with OpenSSL in FIPS mode.
AWS-LC does not inherit the same specific behavior, so tests
have been adjusted accordingly.

https://github.com/ruby/openssl/commit/3117897dbc
This commit is contained in:
Samuel Chiang 2025-02-12 01:59:29 +00:00 committed by git
parent 841d9f259d
commit 23465d8446

View File

@ -19,7 +19,7 @@ class OpenSSL::TestPKeyDH < OpenSSL::PKeyTestCase
end if ENV["OSSL_TEST_ALL"]
def test_new_break_on_non_fips
omit_on_fips
omit_on_fips if !aws_lc?
assert_nil(OpenSSL::PKey::DH.new(NEW_KEYLEN) { break })
assert_raise(RuntimeError) do
@ -29,6 +29,7 @@ class OpenSSL::TestPKeyDH < OpenSSL::PKeyTestCase
def test_new_break_on_fips
omit_on_non_fips
return unless openssl? # This behavior only applies to OpenSSL.
# The block argument is not executed in FIPS case.
# See https://github.com/ruby/openssl/issues/692 for details.