0001-Do-not-check-for-ERR_remove_thread_state-do-not-link.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From f519e0f30a00393b949c4e20868952726a9c6d2e Mon Sep 17 00:00:00 2001
  2. From: Pierce Lopez <pierce.lopez@gmail.com>
  3. Date: Thu, 2 Mar 2017 21:09:32 -0500
  4. Subject: [PATCH] Do not check for ERR_remove_thread_state() (do not link ssl
  5. into every library)
  6. This reverts commit c4e9d9bd662de7f575f2172c160795d452ebe709
  7. ("sample/https-client: check for ERR_remove_thread_state() existence").
  8. Calling AC_SEARCH_LIBS() modifies LIBS - -lcrypto incorrectly
  9. ends up in LIBS, and thus linked to by libevent_core.so.
  10. Checking for ERR_remove_thread_state should no longer be needed
  11. because it was introduced in openssl 1.0.0, and the previous line
  12. 0.9.8 had support discontinued at the end of 2015.
  13. Fixes: #473
  14. ---
  15. configure.ac | 4 ----
  16. sample/https-client.c | 4 ----
  17. 2 files changed, 8 deletions(-)
  18. --- a/configure.ac
  19. +++ b/configure.ac
  20. @@ -791,10 +791,6 @@ fi
  21. # check if we have and should use openssl
  22. AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
  23. -if test "x$enable_openssl" = "xyes"; then
  24. - AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto eay32],
  25. - [AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
  26. -fi
  27. # Add some more warnings which we use in development but not in the
  28. # released versions. (Some relevant gcc versions can't handle these.)
  29. --- a/sample/https-client.c
  30. +++ b/sample/https-client.c
  31. @@ -484,11 +484,7 @@ cleanup:
  32. EVP_cleanup();
  33. ERR_free_strings();
  34. -#ifdef EVENT__HAVE_ERR_REMOVE_THREAD_STATE
  35. ERR_remove_thread_state(NULL);
  36. -#else
  37. - ERR_remove_state(0);
  38. -#endif
  39. CRYPTO_cleanup_all_ex_data();
  40. sk_SSL_COMP_free(SSL_COMP_get_compression_methods());