Add support for passing the libctx to the config loader
authorShane Lontis <shane.lontis@oracle.com>
Fri, 20 Mar 2020 10:25:39 +0000 (20:25 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Fri, 20 Mar 2020 10:25:39 +0000 (20:25 +1000)
commit22e27978b29b2cdc1db79659ed653d6cf31834ab
treef156d63b1f889794d723167e59108d088fbe5907
parent0f2deef59d13e852a4bde0e853e9b49bab51a108
Add support for passing the libctx to the config loader

The self tests for the fips module are triggered on startup and they need to know the
core's libctx in order to function correctly. As the provider can be autoloaded via configuration
it then needs to propagate the callers libctx down to the provider via the config load.

Note that OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, ..) is still called, but will only load the default
configuration if the OPENSSL_CONF environment variable is set.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11240)
16 files changed:
crypto/conf/conf_lib.c
crypto/conf/conf_mod.c
crypto/conf/conf_sap.c
crypto/context.c
crypto/provider_conf.c
doc/man3/CONF_modules_free.pod
doc/man3/CONF_modules_load_file.pod
doc/man3/NCONF_new_with_libctx.pod [new file with mode: 0644]
doc/man3/OPENSSL_CTX.pod
doc/man5/config.pod
include/openssl/conf.h
include/openssl/crypto.h
test/evp_fetch_prov_test.c
test/recipes/30-test_evp_fetch_prov.t
util/libcrypto.num
util/missingcrypto.txt