aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-04-05 09:06:10 -0400
committerTomas Mraz <tomas@openssl.org>2024-04-18 18:38:56 +0200
commit4e3c1e6206251c59855362d6d2edab4621c31dec (patch)
treed18bc3156dbad11348b4d1c354f3ef1eebed1974 /crypto
parentb80fed3f27ebe156b17246f7c12c5178cbe6834e (diff)
downloadopenssl-4e3c1e6206251c59855362d6d2edab4621c31dec.tar.gz
Fix up path generation to use OPENSSL_MODULES
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24025)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/provider_core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index 4bbb928006..297b281a39 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -573,10 +573,6 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
/* provider_new() generates an error, so no need here */
prov = provider_new(name, template.init, template.parameters);
- if (!ossl_provider_set_module_path(prov, template.path)) {
- ossl_provider_free(prov);
- return NULL;
- }
if (params != NULL) /* We copied the parameters, let's free them */
sk_INFOPAIR_pop_free(template.parameters, infopair_free);
@@ -584,6 +580,11 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
if (prov == NULL)
return NULL;
+ if (!ossl_provider_set_module_path(prov, template.path)) {
+ ossl_provider_free(prov);
+ return NULL;
+ }
+
prov->libctx = libctx;
#ifndef FIPS_MODULE
prov->error_lib = ERR_get_next_error_library();