diff options
Diffstat (limited to 'crypto/provider.c')
-rw-r--r-- | crypto/provider.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/provider.c b/crypto/provider.c index 40c837d8c0..e05279b89d 100644 --- a/crypto/provider.c +++ b/crypto/provider.c @@ -13,7 +13,7 @@ #include <openssl/core_names.h> #include "internal/provider.h" -OSSL_PROVIDER *OSSL_PROVIDER_load(OPENSSL_CTX *libctx, const char *name) +OSSL_PROVIDER *OSSL_PROVIDER_try_load(OPENSSL_CTX *libctx, const char *name) { OSSL_PROVIDER *prov = NULL; @@ -30,6 +30,14 @@ OSSL_PROVIDER *OSSL_PROVIDER_load(OPENSSL_CTX *libctx, const char *name) return prov; } +OSSL_PROVIDER *OSSL_PROVIDER_load(OPENSSL_CTX *libctx, const char *name) +{ + /* Any attempt to load a provider disables auto-loading of defaults */ + if (ossl_provider_disable_fallback_loading(libctx)) + return OSSL_PROVIDER_try_load(libctx, name); + return NULL; +} + int OSSL_PROVIDER_unload(OSSL_PROVIDER *prov) { ossl_provider_free(prov); |