Remove conditional FIPS dependence for 3DES
authorPauli <pauli@openssl.org>
Thu, 22 Sep 2022 03:44:35 +0000 (13:44 +1000)
committerPauli <pauli@openssl.org>
Tue, 1 Nov 2022 21:42:46 +0000 (08:42 +1100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/19510)

test/evp_libctx_test.c

index 2448c35a149f60892d238e51a7b97857ed8b8628..bb31328214072eadfea7d440a9f068e2f11f0280 100644 (file)
@@ -745,8 +745,14 @@ int setup_tests(void)
 #ifndef OPENSSL_NO_DH
     ADD_TEST(kem_invalid_keytype);
 #endif
+    /*
+     * The FIPS provider doesn't have 3DES, so we skip this test if
+     * FIPS is available.  It's not perfect because FIPS + default might be
+     * loaded but it's good enough.
+     */
 #ifndef OPENSSL_NO_DES
-    ADD_TEST(test_cipher_tdes_randkey);
+    if (!OSSL_PROVIDER_available(libctx, "fips"))
+        ADD_TEST(test_cipher_tdes_randkey);
 #endif
     return 1;
 }