Test that properties are mirrored as we expect
[openssl.git] / test / p_test.c
index 22bf8648fe10f1e7d2c8c3c28d016e6702053e28..d4e187f94abc8ee82488d3188a322416bdf8c9b8 100644 (file)
@@ -266,6 +266,18 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
         p_teardown(ctx);
         return 0;
     }
+    /*
+     * The default provider is loaded - but the default properties should not
+     * allow its use.
+     */
+    {
+        EVP_MD *sha256 = EVP_MD_fetch(ctx->libctx, "SHA2-256", NULL);
+        if (sha256 != NULL) {
+            EVP_MD_free(sha256);
+            p_teardown(ctx);
+            return 0;
+        }
+    }
 #endif
 
     /*