Commit 48114a86 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

openssl: ERR_remove_thread_state() is deprecated in latest 1.1.0

See OpenSSL commit 21e001747d4a
parent 8243a958
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -97,8 +97,8 @@
#define HAVE_ERR_REMOVE_THREAD_STATE 1
#define HAVE_ERR_REMOVE_THREAD_STATE 1
#if (OPENSSL_VERSION_NUMBER >= 0x10100004L) && \
#if (OPENSSL_VERSION_NUMBER >= 0x10100004L) && \
  !defined(LIBRESSL_VERSION_NUMBER)
  !defined(LIBRESSL_VERSION_NUMBER)
/* OpenSSL 1.1.0-pre4 removed the argument! */
/* OpenSSL 1.1.0 deprecates the function */
#define HAVE_ERR_REMOVE_THREAD_STATE_NOARG 1
#define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1
#endif
#endif
#endif
#endif


@@ -737,8 +737,8 @@ void Curl_ossl_cleanup(void)
  ERR_free_strings();
  ERR_free_strings();


  /* Free thread local error state, destroying hash upon zero refcount */
  /* Free thread local error state, destroying hash upon zero refcount */
#ifdef HAVE_ERR_REMOVE_THREAD_STATE_NOARG
#ifdef HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED
  ERR_remove_thread_state();

#elif defined(HAVE_ERR_REMOVE_THREAD_STATE)
#elif defined(HAVE_ERR_REMOVE_THREAD_STATE)
  ERR_remove_thread_state(NULL);
  ERR_remove_thread_state(NULL);
#else
#else