From 23465d8446fa32c7a76f0e11c4bf8f1e56e98e9e Mon Sep 17 00:00:00 2001 From: Samuel Chiang Date: Wed, 12 Feb 2025 01:59:29 +0000 Subject: [PATCH] [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 --- test/openssl/test_pkey_dh.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb index 6e1cad9dff..fdb1b04424 100644 --- a/test/openssl/test_pkey_dh.rb +++ b/test/openssl/test_pkey_dh.rb @@ -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.