diff options
author | Pauli <ppzgs1@gmail.com> | 2021-02-18 09:16:26 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-02-23 23:24:41 +1000 |
commit | 299f5ff3b5f2a5a9b5666e36a6a01fc430de9198 (patch) | |
tree | a522f985b02749c53b628f193c767de3c9fb93f6 /include | |
parent | 332a245c04dff95f81cfa1f77e0f8a935794f5ee (diff) |
provider: add option to load a provider without disabling the fallbacks.
Add an argument to PROVIDER_try_load() that permits a provider to be
loaded without changing the fallback status. This is useful when an
additional provider needs to be loaded without perturbing any other setup.
E.g. adding mock providers as part of unit testing.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13652)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/provider.h | 2 | ||||
-rw-r--r-- | include/openssl/provider.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/internal/provider.h b/include/internal/provider.h index a91c515f04..fbe3154b53 100644 --- a/include/internal/provider.h +++ b/include/internal/provider.h @@ -49,7 +49,7 @@ int ossl_provider_disable_fallback_loading(OSSL_LIB_CTX *libctx); * Activate the Provider * If the Provider is a module, the module will be loaded */ -int ossl_provider_activate(OSSL_PROVIDER *prov); +int ossl_provider_activate(OSSL_PROVIDER *prov, int retain_fallbacks); int ossl_provider_deactivate(OSSL_PROVIDER *prov); /* Check if the provider is available (activated) */ int ossl_provider_available(OSSL_PROVIDER *prov); diff --git a/include/openssl/provider.h b/include/openssl/provider.h index 723201e1c5..a8720aaa7e 100644 --- a/include/openssl/provider.h +++ b/include/openssl/provider.h @@ -22,7 +22,8 @@ int OSSL_PROVIDER_set_default_search_path(OSSL_LIB_CTX *, const char *path); /* Load and unload a provider */ OSSL_PROVIDER *OSSL_PROVIDER_load(OSSL_LIB_CTX *, const char *name); -OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *, const char *name); +OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *, const char *name, + int retain_fallbacks); int OSSL_PROVIDER_unload(OSSL_PROVIDER *prov); int OSSL_PROVIDER_available(OSSL_LIB_CTX *, const char *name); int OSSL_PROVIDER_do_all(OSSL_LIB_CTX *ctx, |