diff options
author | Richard Levitte <levitte@openssl.org> | 2022-05-04 09:15:29 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-05-05 15:06:12 +0200 |
commit | 32e3c071373280b69be02ba91fc3204495e2e1bf (patch) | |
tree | 2d2c6b36aec2a7bb3073cd1de29e72a9b78490ab /include/crypto | |
parent | 4da7663b02bf05542830e85db6f74cf90daf1f49 (diff) |
Add method store cache flush and method removal to non-EVP operations
evp_method_store_flush() and evp_method_store_remove_all_provided()
only cover EVP operations, but not encoders, decoders and store loaders.
This adds corresponding methods for those as well. Without this, their
method stores are never cleaned up when the corresponding providers are
deactivated or otherwise modified.
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 'include/crypto')
-rw-r--r-- | include/crypto/decoder.h | 2 | ||||
-rw-r--r-- | include/crypto/encoder.h | 10 | ||||
-rw-r--r-- | include/crypto/store.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/include/crypto/decoder.h b/include/crypto/decoder.h index cc06ef2926..95afd25b0b 100644 --- a/include/crypto/decoder.h +++ b/include/crypto/decoder.h @@ -38,5 +38,7 @@ int ossl_decoder_ctx_setup_for_pkey(OSSL_DECODER_CTX *ctx, const char *propquery); int ossl_decoder_get_number(const OSSL_DECODER *encoder); +int ossl_decoder_store_cache_flush(OSSL_LIB_CTX *libctx); +int ossl_decoder_store_remove_all_provided(const OSSL_PROVIDER *prov); #endif diff --git a/include/crypto/encoder.h b/include/crypto/encoder.h index 09d445d210..ae56131eb3 100644 --- a/include/crypto/encoder.h +++ b/include/crypto/encoder.h @@ -7,8 +7,16 @@ * https://www.openssl.org/source/license.html */ -#include <openssl/types.h> +#ifndef OSSL_CRYPTO_ENCODER_H +# define OSSL_CRYPTO_ENCODER_H +# pragma once + +# include <openssl/types.h> OSSL_ENCODER *ossl_encoder_fetch_by_number(OSSL_LIB_CTX *libctx, int id, const char *properties); int ossl_encoder_get_number(const OSSL_ENCODER *encoder); +int ossl_encoder_store_cache_flush(OSSL_LIB_CTX *libctx); +int ossl_encoder_store_remove_all_provided(const OSSL_PROVIDER *prov); + +#endif diff --git a/include/crypto/store.h b/include/crypto/store.h index 13d2646bba..9b7be71acd 100644 --- a/include/crypto/store.h +++ b/include/crypto/store.h @@ -17,5 +17,7 @@ void ossl_store_cleanup_int(void); int ossl_store_loader_get_number(const OSSL_STORE_LOADER *loader); +int ossl_store_loader_store_cache_flush(OSSL_LIB_CTX *libctx); +int ossl_store_loader_store_remove_all_provided(const OSSL_PROVIDER *prov); #endif |