]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
crypto_openssl: add initialization to pick up local configuration
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 28 May 2020 22:59:19 +0000 (15:59 -0700)
committerGert Doering <gert@greenie.muc.de>
Sat, 6 Jun 2020 18:08:56 +0000 (20:08 +0200)
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 <James.Bottomley@HansenPartnership.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
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 <gert@greenie.muc.de>
src/openvpn/crypto_openssl.c

index 4ac77fdef2ed2eea8ed5b6695e35edb04a30e3ee..fd57edd22d2eebdebf300c96825a6ded69382ad2 100644 (file)
@@ -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