File curl-use_OPENSSL_config.patch of Package curl.20435

This basically reverts  https://github.com/curl/curl/commit/7d2f61f66ab4e047fc9aefc2effc1ac6d340a66a

diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 80e9bf940..ba227891f 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -925,26 +925,12 @@ static int Curl_ossl_init(void)
   ENGINE_load_builtin_engines();
 #endif
 
-  /* OPENSSL_config(NULL); is "strongly recommended" to use but unfortunately
-     that function makes an exit() call on wrongly formatted config files
-     which makes it hard to use in some situations. OPENSSL_config() itself
-     calls CONF_modules_load_file() and we use that instead and we ignore
-     its return code! */
-
-  /* CONF_MFLAGS_DEFAULT_SECTION introduced some time between 0.9.8b and
-     0.9.8e */
-#ifndef CONF_MFLAGS_DEFAULT_SECTION
-#define CONF_MFLAGS_DEFAULT_SECTION 0x0
-#endif
-
-  CONF_modules_load_file(NULL, NULL,
-                         CONF_MFLAGS_DEFAULT_SECTION|
-                         CONF_MFLAGS_IGNORE_MISSING_FILE);
-
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
     !defined(LIBRESSL_VERSION_NUMBER)
-  /* OpenSSL 1.1.0+ takes care of initialization itself */
+  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
 #else
+  OPENSSL_config(NULL);
+
   /* Lets get nice error messages */
   SSL_load_error_strings();
 
openSUSE Build Service is sponsored by