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-18 18:39:46 +0200
commitbad44bae8b9e7e853db96c6785633b21bf4e3e83 (patch)
tree10ea7125e7635ab71560a9090f87833f3d5f6e3c
parent942fdf94516fd66cb8af8f862e60a878674d9883 (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> (Merged from https://github.com/openssl/openssl/pull/24025) (cherry picked from commit bc9595963a45e28e6a8b2de45a6719c252bd3a3d)
-rw-r--r--crypto/provider_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index b0cb039705..4bbb928006 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -573,6 +573,10 @@ 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);