File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -18,25 +18,20 @@ def test_new_generate
1818 assert_key ( dh )
1919 end if ENV [ "OSSL_TEST_ALL" ]
2020
21- def test_new_break_on_non_fips
22- omit_on_fips if !aws_lc?
23-
24- assert_nil ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { break } )
25- assert_raise ( RuntimeError ) do
26- OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { raise }
21+ def test_new_break
22+ unless openssl? && OpenSSL . fips_mode
23+ assert_nil ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { break } )
24+ assert_raise ( RuntimeError ) do
25+ OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { raise }
26+ end
27+ else
28+ # The block argument is not executed in FIPS case.
29+ # See https://github.com/ruby/openssl/issues/692 for details.
30+ assert ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { break } )
31+ assert ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { raise } )
2732 end
2833 end
2934
30- def test_new_break_on_fips
31- omit_on_non_fips
32- return unless openssl? # This behavior only applies to OpenSSL.
33-
34- # The block argument is not executed in FIPS case.
35- # See https://github.com/ruby/openssl/issues/692 for details.
36- assert ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { break } )
37- assert ( OpenSSL ::PKey ::DH . new ( NEW_KEYLEN ) { raise } )
38- end
39-
4035 def test_derive_key
4136 params = Fixtures . pkey ( "dh2048_ffdhe2048" )
4237 dh1 = OpenSSL ::PKey . generate_key ( params )
You can’t perform that action at this time.
0 commit comments