From: Richard Levitte Date: Mon, 15 Jul 2019 09:55:33 +0000 (+0200) Subject: Provider config module: allow providers to already be loaded X-Git-Tag: openssl-3.0.0-alpha1~1774 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=da0201814380144151293811e9cd63732e0e0c3e Provider config module: allow providers to already be loaded This allows 'default' to be configured in the config file, if needed. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/9371) --- diff --git a/crypto/provider_conf.c b/crypto/provider_conf.c index 74162a88b3..25881d6de8 100644 --- a/crypto/provider_conf.c +++ b/crypto/provider_conf.c @@ -113,7 +113,9 @@ static int provider_conf_load(OPENSSL_CTX *libctx, const char *name, activate = 1; } - prov = ossl_provider_new(libctx, name, NULL); + prov = ossl_provider_find(libctx, name); + if (prov == NULL) + prov = ossl_provider_new(libctx, name, NULL); if (prov == NULL) { if (soft) ERR_clear_error();