summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2022-04-22 11:00:36 +0200
committerRichard Levitte <levitte@openssl.org>2022-05-05 15:05:54 +0200
commit60640d79ca7ea0980dc09c71fe6a297b5f8588a2 (patch)
treeb6d7d3a6986abc2e8bfccc4ec532dabe34068706 /crypto/evp
parent10937d5867039afbf869c8514245ed7599b61307 (diff)
Don't empty the method store when flushing the query cache
When evp_method_store_flush() flushed the query cache, it also freed all methods in the EVP method store, through an unfortunate call of ossl_method_store_flush_cache() with an argument saying that all methods should indeed be dropped. To undo some of the confusion, ossl_method_store_flush_cache() is renamed to ossl_method_store_cache_flush_all(), and limited to do only that. Some if the items in the internal ALGORITHM structure are also renamed and commented to clarify what they are for. Fixes #18150 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/evp_fetch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/evp/evp_fetch.c b/crypto/evp/evp_fetch.c
index 25ecd1b912..5fe9c7e930 100644
--- a/crypto/evp/evp_fetch.c
+++ b/crypto/evp/evp_fetch.c
@@ -409,12 +409,12 @@ void *evp_generic_fetch_from_prov(OSSL_PROVIDER *prov, int operation_id,
return method;
}
-int evp_method_store_flush(OSSL_LIB_CTX *libctx)
+int evp_method_store_cache_flush(OSSL_LIB_CTX *libctx)
{
OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
if (store != NULL)
- return ossl_method_store_flush_cache(store, 1);
+ return ossl_method_store_cache_flush_all(store);
return 1;
}
@@ -461,7 +461,7 @@ static int evp_set_parsed_default_properties(OSSL_LIB_CTX *libctx,
ossl_property_free(*plp);
*plp = def_prop;
if (store != NULL)
- return ossl_method_store_flush_cache(store, 0);
+ return ossl_method_store_cache_flush_all(store);
}
ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
return 0;