diff --git a/test/openssl/test_fips.rb b/test/openssl/test_fips.rb index 8a33cecdd..efc2655e2 100644 --- a/test/openssl/test_fips.rb +++ b/test/openssl/test_fips.rb @@ -37,7 +37,10 @@ def test_fips_mode_is_reentrant end def test_fips_mode_get_with_fips_mode_set - omit('OpenSSL is not FIPS-capable') unless OpenSSL::OPENSSL_FIPS and !aws_lc? # AWS-LC's FIPS mode is decided at compile time. + return if aws_lc? # AWS-LC's FIPS mode is decided at compile time. + unless ENV["TEST_RUBY_OPENSSL_FIPS_ENABLED"] + omit "Only for FIPS mode environment" + end assert_separately(["-ropenssl"], <<~"end;") begin