summaryrefslogtreecommitdiff
path: root/crypto/provider_core.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-06-22 12:07:48 +0100
committerMatt Caswell <matt@openssl.org>2021-06-24 14:48:15 +0100
commitd382c4652570766fc7a9ccfc63e7a62aea3d5bcb (patch)
tree60b988e85a8c5286f556598e46b3a172d91487bd /crypto/provider_core.c
parent29d46e09ce0e66b5dc8faecfa48d5f667217302e (diff)
downloadopenssl-new-d382c4652570766fc7a9ccfc63e7a62aea3d5bcb.tar.gz
Move OPENSSL_add_builtin back into provider.c
An earlier stage of the refactor in the last few commits moved this function out of provider.c because it needed access to the provider structure internals. The final version however no longer needs this so it is moved back again. 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_core.c')
-rw-r--r--crypto/provider_core.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index 35d5472180..1878ffab7c 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -319,29 +319,6 @@ int ossl_provider_info_add_to_store(OSSL_LIB_CTX *libctx,
return ret;
}
-int OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX *libctx, const char *name,
- OSSL_provider_init_fn *init_fn)
-{
- OSSL_PROVIDER_INFO entry;
-
- if (name == NULL || init_fn == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
- return 0;
- }
- memset(&entry, 0, sizeof(entry));
- entry.name = OPENSSL_strdup(name);
- if (entry.name == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
- return 0;
- }
- entry.init = init_fn;
- if (!ossl_provider_info_add_to_store(libctx, &entry)) {
- ossl_provider_info_clear(&entry);
- return 0;
- }
- return 1;
-}
-
OSSL_PROVIDER *ossl_provider_find(OSSL_LIB_CTX *libctx, const char *name,
int noconfig)
{