]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
set module path from template
authorNeil Horman <nhorman@openssl.org>
Tue, 2 Apr 2024 19:02:51 +0000 (15:02 -0400)
committerTomas Mraz <tomas@openssl.org>
Fri, 26 Apr 2024 12:04:25 +0000 (14:04 +0200)
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)

crypto/provider_core.c

index e90b63b303f9c990461629b5a37be1222a603805..07b63c45ba3c4c017ed1a6b6b458b6774c2c7c38 100644 (file)
@@ -559,8 +559,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