diff options
author | Richard Levitte <levitte@openssl.org> | 2022-04-22 16:44:51 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-05-05 15:05:55 +0200 |
commit | 2e4d0677ea858c619a33235265dbee19520a9d35 (patch) | |
tree | 9d8df904bc5e2c15919065c7fe0e7f85c88d76a6 /include/internal/property.h | |
parent | 60640d79ca7ea0980dc09c71fe6a297b5f8588a2 (diff) |
Make it possible to remove methods by the provider that provides them
This adds ossl_method_store_remove_all_provided(), which selectively
removes methods from the given store that are provided by the given
provider.
This also adds the EVP specific evp_method_store_remove_all_provided(),
which matches ossl_method_store_remove_all_provided() but can also
retrieve the correct store to manipulate for EVP functions.
This allows us to modify ossl_provider_self_test() to do the job it's
supposed to do, but through clearly defined functions instead of a
cache flushing call that previously did more than that.
ossl_provider_deactivate() is also modified to remove methods associated
with the deactivated provider, and not just clearing the cache.
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/internal/property.h')
-rw-r--r-- | include/internal/property.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/internal/property.h b/include/internal/property.h index 9c68e8c346..db08c33cc3 100644 --- a/include/internal/property.h +++ b/include/internal/property.h @@ -64,6 +64,8 @@ void ossl_method_store_do_all(OSSL_METHOD_STORE *store, int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid, const char *prop_query, const OSSL_PROVIDER **prov, void **method); +int ossl_method_store_remove_all_provided(OSSL_METHOD_STORE *store, + const OSSL_PROVIDER *prov); /* Get the global properties associate with the specified library context */ OSSL_PROPERTY_LIST **ossl_ctx_global_properties(OSSL_LIB_CTX *ctx, |