diff options
author | ambrosin <ambrosin@google.com> | 2023-04-20 06:13:22 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-04-20 06:14:39 -0700 |
commit | 113db291f03cc90700f8278ff24f9cfb1f0db05b (patch) | |
tree | 4a0f7a1a706682a1da46a132f06863bd7ad9c1bf /cc/config | |
parent | 4239f1069b4bff49e175235ff1e12f13d145e4e5 (diff) | |
download | tink-113db291f03cc90700f8278ff24f9cfb1f0db05b.tar.gz |
Replace direct use of FIPS_mode with an internal util function
The function returns `false` if OpenSSL is used.
PiperOrigin-RevId: 525726396
Diffstat (limited to 'cc/config')
-rw-r--r-- | cc/config/fips_140_2_test.cc | 8 | ||||
-rw-r--r-- | cc/config/tink_fips_test.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cc/config/fips_140_2_test.cc b/cc/config/fips_140_2_test.cc index 4140da3a9..fb01f12b0 100644 --- a/cc/config/fips_140_2_test.cc +++ b/cc/config/fips_140_2_test.cc @@ -56,7 +56,7 @@ class Fips1402Test : public ::testing::Test { }; TEST_F(Fips1402Test, ConfigFips1402) { - if (!FIPS_mode()) { + if (!internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Only test in FIPS mode"; } @@ -83,7 +83,7 @@ TEST_F(Fips1402Test, ConfigFips1402) { } TEST_F(Fips1402Test, NonFipsKeyManagerIsNotPresent) { - if (!FIPS_mode()) { + if (!internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Only test in FIPS mode"; } @@ -94,7 +94,7 @@ TEST_F(Fips1402Test, NonFipsKeyManagerIsNotPresent) { } TEST_F(Fips1402Test, ConfigFips1402FailsInNonFipsMode) { - if (FIPS_mode()) { + if (internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Only test in non-FIPS mode"; } @@ -103,7 +103,7 @@ TEST_F(Fips1402Test, ConfigFips1402FailsInNonFipsMode) { } TEST_F(Fips1402Test, NewKeyDataAndWrapKeysetSucceeds) { - if (!FIPS_mode()) { + if (!internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Only test in FIPS mode"; } diff --git a/cc/config/tink_fips_test.cc b/cc/config/tink_fips_test.cc index 61dc06d38..ec15ca74a 100644 --- a/cc/config/tink_fips_test.cc +++ b/cc/config/tink_fips_test.cc @@ -65,7 +65,7 @@ TEST(TinkFipsTest, FipsDisabledWhenNotBuildInFipsMode) { } TEST(TinkFipsTest, CompatibilityChecksWithBoringCrypto) { - if (!FIPS_mode()) { + if (!internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Test only run if BoringCrypto module is available."; } @@ -88,7 +88,7 @@ TEST(TinkFipsTest, CompatibilityChecksWithBoringCrypto) { } TEST(TinkFipsTest, CompatibilityChecksWithoutBoringCrypto) { - if (FIPS_mode()) { + if (internal::IsFipsEnabledInSsl()) { GTEST_SKIP() << "Test only run if BoringCrypto module is not available."; } |