summaryrefslogtreecommitdiffstats
path: root/crypto/provider.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-06-18 12:28:40 +0100
committerMatt Caswell <matt@openssl.org>2021-06-24 14:48:14 +0100
commit1d74203cf5d8542d349fbb2d5f35ad40994dec9f (patch)
treea3c4d976fc41d54db82922e19901dea3c237b4f5 /crypto/provider.c
parent8d4dec0d4b3055b4c2e7ece5ac99b67b3e77995e (diff)
Instantiate user-added builtin providers when we need them
Previously we created the provider object for builtin providers at the point that OPENSSL_add_builtin() was called. Instead we delay that until the provider is actually loaded. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15854)
Diffstat (limited to 'crypto/provider.c')
-rw-r--r--crypto/provider.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/crypto/provider.c b/crypto/provider.c
index 60664e9e24..5aec157c1f 100644
--- a/crypto/provider.c
+++ b/crypto/provider.c
@@ -94,29 +94,6 @@ int OSSL_PROVIDER_get_capabilities(const OSSL_PROVIDER *prov,
return ossl_provider_get_capabilities(prov, capability, cb, arg);
}
-int OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX *libctx, const char *name,
- OSSL_provider_init_fn *init_fn)
-{
- OSSL_PROVIDER *prov = NULL;
-
- if (name == NULL || init_fn == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
- return 0;
- }
-
- /* Create it */
- if ((prov = ossl_provider_new(libctx, name, init_fn, 0)) == NULL)
- return 0;
-
- /*
- * It's safely stored in the internal store at this point,
- * free the returned extra reference
- */
- ossl_provider_free(prov);
-
- return 1;
-}
-
const char *OSSL_PROVIDER_get0_name(const OSSL_PROVIDER *prov)
{
return ossl_provider_name(prov);