summaryrefslogtreecommitdiffstats
path: root/crypto/evp/exchange.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-10-04 15:33:37 +0200
committerRichard Levitte <levitte@openssl.org>2021-10-27 12:41:15 +0200
commitdc010ca6ec01d313a84c3c4b040232655a1772ad (patch)
treeb925e2db5fad6f5c06e5bbac180fe15c223ae8b7 /crypto/evp/exchange.c
parent433e13455ede1a39d415b690b8a564b4f36b8dee (diff)
CORE: Encure that cached fetches can be done per provider
This mostly entails passing around a provider pointer, and handling queries that includes a pointer to a provider, where NULL means "any". This also means that there's a need to pass the provider pointer, not just down to the cache functions, but also be able to get it from ossl_method_store_fetch(). To this end, that function's OSSL_PROVIDER pointer argument is modified to be a pointer reference, so the function can answer back what provider the method comes from. Test added. Fixes #16614 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16725)
Diffstat (limited to 'crypto/evp/exchange.c')
-rw-r--r--crypto/evp/exchange.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c
index d12dcee947..e2ca30c94d 100644
--- a/crypto/evp/exchange.c
+++ b/crypto/evp/exchange.c
@@ -274,7 +274,7 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[])
* the second iteration, or jump to legacy.
*/
for (iter = 1, provkey = NULL; iter < 3 && provkey == NULL; iter++) {
- EVP_KEYMGMT *tmp_keymgmt_tofree;
+ EVP_KEYMGMT *tmp_keymgmt_tofree = NULL;
/*
* If we're on the second iteration, free the results from the first.