summaryrefslogtreecommitdiffstats
path: root/crypto/core_fetch.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-06-15 10:18:19 +0200
committerMatt Caswell <matt@openssl.org>2021-06-16 12:32:53 +0100
commit6882652e65d39310c98ba506ceb55a87c702d419 (patch)
tree018c57753bb219a0d59e40f28076952b9cdc4977 /crypto/core_fetch.c
parent99325852207e3f8ae970799235de169b40eded75 (diff)
CORE: Do a bit of cleanup of core fetching
Some data, like the library context, were passed both through higher level callback structures and through arguments to those same higher level callbacks. This is a bit unnecessary, so we rearrange the callback arguments to simply pass that callback structure and rely on the higher level fetching functionality to pick out what data they need from that structure. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15750)
Diffstat (limited to 'crypto/core_fetch.c')
-rw-r--r--crypto/core_fetch.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/crypto/core_fetch.c b/crypto/core_fetch.c
index fade75f4c9..d315599ce6 100644
--- a/crypto/core_fetch.c
+++ b/crypto/core_fetch.c
@@ -84,8 +84,7 @@ static void ossl_method_construct_this(OSSL_PROVIDER *provider,
if (data->force_store || !no_store) {
/* If we haven't been told not to store, add to the global store */
- data->mcm->put(data->libctx, NULL, method, provider,
- data->operation_id, algo->algorithm_names,
+ data->mcm->put(NULL, method, provider, algo->algorithm_names,
algo->property_definition, data->mcm_data);
} else {
/*
@@ -97,8 +96,7 @@ static void ossl_method_construct_this(OSSL_PROVIDER *provider,
if ((data->store = data->mcm->get_tmp_store(data->mcm_data)) == NULL)
return;
- data->mcm->put(data->libctx, data->store, method, provider,
- data->operation_id, algo->algorithm_names,
+ data->mcm->put(data->store, method, provider, algo->algorithm_names,
algo->property_definition, data->mcm_data);
}
@@ -112,12 +110,10 @@ void *ossl_method_construct(OSSL_LIB_CTX *libctx, int operation_id,
{
void *method = NULL;
- if ((method = mcm->get(libctx, NULL, mcm_data)) == NULL) {
+ if ((method = mcm->get(NULL, mcm_data)) == NULL) {
struct construct_data_st cbdata;
- cbdata.libctx = libctx;
cbdata.store = NULL;
- cbdata.operation_id = operation_id;
cbdata.force_store = force_store;
cbdata.mcm = mcm;
cbdata.mcm_data = mcm_data;
@@ -129,11 +125,11 @@ void *ossl_method_construct(OSSL_LIB_CTX *libctx, int operation_id,
/* If there is a temporary store, try there first */
if (cbdata.store != NULL)
- method = mcm->get(libctx, cbdata.store, mcm_data);
+ method = mcm->get(cbdata.store, mcm_data);
/* If no method was found yet, try the global store */
if (method == NULL)
- method = mcm->get(libctx, NULL, mcm_data);
+ method = mcm->get(NULL, mcm_data);
}
return method;