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)
}
/* 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