You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2015/04/15 04:08:02 UTC

svn commit: r1673617 - /tomcat/native/branches/1.1.x/native/src/ssl.c

Author: billbarker
Date: Wed Apr 15 02:08:02 2015
New Revision: 1673617

URL: http://svn.apache.org/r1673617
Log:
More cleanup of thread ID handling for openssl master plus remove compile warning that doesn't make any difference. Still no change if compiling against any currently released version of openssl

Modified:
    tomcat/native/branches/1.1.x/native/src/ssl.c

Modified: tomcat/native/branches/1.1.x/native/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/ssl.c?rev=1673617&r1=1673616&r2=1673617&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/native/src/ssl.c (original)
+++ tomcat/native/branches/1.1.x/native/src/ssl.c Wed Apr 15 02:08:02 2015
@@ -53,11 +53,15 @@ struct CRYPTO_dynlock_value {
  * Handle the Temporary RSA Keys and DH Params
  */
 
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
 #define SSL_TMP_KEY_FREE(type, idx)                     \
     if (SSL_temp_keys[idx]) {                           \
         type##_free((type *)SSL_temp_keys[idx]);        \
         SSL_temp_keys[idx] = NULL;                      \
     } else (void)(0)
+#else
+#define SSL_TMP_KEY_FREE(type, idx)    SSL_temp_keys[idx] = NULL
+#endif
 
 #define SSL_TMP_KEYS_FREE(type) \
     SSL_TMP_KEY_FREE(type, SSL_TMP_KEY_##type##_512);   \
@@ -315,7 +319,11 @@ static apr_status_t ssl_init_cleanup(voi
 #if OPENSSL_VERSION_NUMBER >= 0x00907001
     CRYPTO_cleanup_all_ex_data();
 #endif
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
     ERR_remove_state(0);
+#else
+    ERR_remove_thread_state(NULL);
+#endif
 
     /* Don't call ERR_free_strings here; ERR_load_*_strings only
      * actually load the error strings once per process due to static
@@ -367,7 +375,6 @@ static void ssl_thread_lock(int mode, in
     }
 }
 
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
 static unsigned long ssl_thread_id(void)
 {
     /* OpenSSL needs this to return an unsigned long.  On OS/390, the pthread
@@ -387,7 +394,6 @@ static unsigned long ssl_thread_id(void)
     return (unsigned long)(apr_os_thread_current());
 #endif
 }
-#endif
 
 static apr_status_t ssl_thread_cleanup(void *data)
 {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org