Clean up the encoder/decoder/loader stores before providers

We already had the evp method store being cleaned up before the provider
store was. This prevents issues where the method clean up functions cause
providers to clean up, which then needs access to the provider store. We
extend the same thinking to the encoder/decoder/loader stores.

Fixes #15727

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15741)
master
Matt Caswell 2 years ago
parent f7d2427ac3
commit 5a5d90ffac

@ -78,7 +78,8 @@ static void *decoder_store_new(OSSL_LIB_CTX *ctx)
static const OSSL_LIB_CTX_METHOD decoder_store_method = {
OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY,
/* We want decoder_store to be cleaned up before the provider store */
OSSL_LIB_CTX_METHOD_PRIORITY_2,
decoder_store_new,
decoder_store_free,
};

@ -78,7 +78,8 @@ static void *encoder_store_new(OSSL_LIB_CTX *ctx)
static const OSSL_LIB_CTX_METHOD encoder_store_method = {
OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY,
/* We want encoder_store to be cleaned up before the provider store */
OSSL_LIB_CTX_METHOD_PRIORITY_2,
encoder_store_new,
encoder_store_free,
};

@ -81,7 +81,8 @@ static void *loader_store_new(OSSL_LIB_CTX *ctx)
static const OSSL_LIB_CTX_METHOD loader_store_method = {
OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY,
/* We want loader_store to be cleaned up before the provider store */
OSSL_LIB_CTX_METHOD_PRIORITY_2,
loader_store_new,
loader_store_free,
};

Loading…
Cancel
Save