From d661b0afb571a68ec11f3dd856aba304c80780ba Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 23 Nov 2017 17:02:48 +0100 Subject: global_init: ignore CURL_GLOBAL_SSL's absense This bit is no longer used. It is not clear what it meant for users to "init the TLS" in a world with different TLS backends and since the introduction of multissl, libcurl didn't properly work if inited without this bit set. Not a single user responded to the call for users of it: https://curl.haxx.se/mail/lib-2017-11/0072.html Reported-by: Evgeny Grin Assisted-by: Jay Satiro Fixes #2089 Fixes #2083 Closes #2107 --- lib/easy.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 2f5cc7f89..5917db36a 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -215,11 +215,10 @@ static CURLcode global_init(long flags, bool memoryfuncs) #endif } - if(flags & CURL_GLOBAL_SSL) - if(!Curl_ssl_init()) { - DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); - return CURLE_FAILED_INIT; - } + if(!Curl_ssl_init()) { + DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); + return CURLE_FAILED_INIT; + } if(flags & CURL_GLOBAL_WIN32) if(win32_init()) { @@ -319,10 +318,7 @@ void curl_global_cleanup(void) return; Curl_global_host_cache_dtor(); - - if(init_flags & CURL_GLOBAL_SSL) - Curl_ssl_cleanup(); - + Curl_ssl_cleanup(); Curl_resolver_global_cleanup(); if(init_flags & CURL_GLOBAL_WIN32) -- cgit v1.2.3