summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-04-02 15:02:51 -0400
committerTomas Mraz <tomas@openssl.org>2024-04-26 14:06:29 +0200
commitb6456af5c043397998997a4f91348fb0aeca2625 (patch)
treeca94ff2d5718d283f02a6f18583b21c635eb6bb1
parentf0115d45072ae7c4e2e3658ec0db43195b31251c (diff)
set module path from template
Modules that aren't activated at conf load time don't seem to set the module path from the template leading to load failures. Make sure to set that Fixes #24020 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (cherry picked from commit bc9595963a45e28e6a8b2de45a6719c252bd3a3d) (Merged from https://github.com/openssl/openssl/pull/24198) (cherry picked from commit 71e5bb982f9c9563567ea8ae9f6e29492e9146ca)
-rw-r--r--crypto/provider_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index 4cadb6a9f0..fb93f9fbe0 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -567,8 +567,11 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
}
/* provider_new() generates an error, so no need here */
- if ((prov = provider_new(name, template.init, template.parameters)) == NULL)
+ prov = provider_new(name, template.init, template.parameters);
+ if (!ossl_provider_set_module_path(prov, template.path)) {
+ ossl_provider_free(prov);
return NULL;
+ }
prov->libctx = libctx;
#ifndef FIPS_MODULE