From: James Bottomley Date: Thu, 28 May 2020 22:59:19 +0000 (-0700) Subject: crypto_openssl: add initialization to pick up local configuration X-Git-Tag: v2.5_beta1~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4071b20115c7d4e808df81169a986e65cec4efa;p=thirdparty%2Fopenvpn.git crypto_openssl: add initialization to pick up local configuration The test programme for the new openssl engine code requires overriding the system default configuration file to point to the location of the test engine. Add an initialization stanza that makes this behaviour universal, so now anyone running openvpn configured with openssl can specify their own configuration file with the OPENSSL_CONF environment variable. Signed-off-by: James Bottomley Acked-by: Arne Schwabe Message-Id: <20200528225920.6983-3-James.Bottomley@HansenPartnership.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19936.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index 4ac77fdef..fd57edd22 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -149,6 +149,11 @@ crypto_init_lib_engine(const char *engine_name) void crypto_init_lib(void) { +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); +#else + OPENSSL_config(NULL); +#endif /* * If you build the OpenSSL library and OpenVPN with * CRYPTO_MDEBUG, you will get a listing of OpenSSL