[tor-commits] [tor/master] Every openssl we support has ERR_remove_thread_state

nickm at torproject.org nickm at torproject.org
Tue Nov 10 15:40:52 UTC 2015


commit 3aebeeffa5bdea5b1392f0d35175d614053b0acb
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Nov 10 10:13:04 2015 -0500

    Every openssl we support has ERR_remove_thread_state
---
 src/common/compat_openssl.h |    2 --
 src/common/crypto.c         |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h
index 96c00c7..23f6950 100644
--- a/src/common/compat_openssl.h
+++ b/src/common/compat_openssl.h
@@ -24,7 +24,6 @@
 #define OpenSSL_version(v) SSLeay_version(v)
 #define OpenSSL_version_num() SSLeay()
 #define RAND_OpenSSL() RAND_SSLeay()
-#define tor_ERR_remove_cur_thread_state() ERR_remove_state(0)
 #ifndef SSL_get_state
 #define SSL_get_state(ssl) SSL_state(ssl)
 #endif
@@ -33,7 +32,6 @@
    ((st) == SSL3_ST_SW_SRVR_HELLO_B))
 #define OSSL_HANDSHAKE_STATE int
 #else
-#define tor_ERR_remove_cur_thread_state() ERR_remove_thread_state(NULL)
 #define STATE_IS_SW_SERVER_HELLO(st) \
   ((st) == TLS_ST_SW_SRVR_HELLO)
 #endif
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 5feb9be..4c41d44 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -403,7 +403,7 @@ crypto_global_init(int useAccel, const char *accelName, const char *accelDir)
 void
 crypto_thread_cleanup(void)
 {
-  tor_ERR_remove_cur_thread_state();
+  ERR_remove_thread_state(NULL);
 }
 
 /** used by tortls.c: wrap an RSA* in a crypto_pk_t. */
@@ -2690,7 +2690,7 @@ int
 crypto_global_cleanup(void)
 {
   EVP_cleanup();
-  tor_ERR_remove_cur_thread_state();
+  ERR_remove_thread_state(NULL);
   ERR_free_strings();
 
   if (dh_param_p)





More information about the tor-commits mailing list