]> granicus.if.org Git - apache/commitdiff
ssl_util.c: log which threadid callback is in use
authorJacob Champion <jchampion@apache.org>
Wed, 19 Apr 2017 02:23:48 +0000 (02:23 +0000)
committerJacob Champion <jchampion@apache.org>
Wed, 19 Apr 2017 02:23:48 +0000 (02:23 +0000)
This should help during testing and debugging. Use APLOG_NOTICE for now,
until we fix PR60999, so that people can actually see the log message.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791847 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_util.c

index 1ae93acd19c9ae349894f8bd5da03e816fb9883d..0e0a2694e4b4fe5c0a206eafdadd0695e8195a2b 100644 (file)
@@ -373,7 +373,11 @@ static void ssl_dyn_destroy_function(struct CRYPTO_dynlock_value *l,
 #if DEFAULT_THREADID_IS_SAFE
 
 /* We don't need to set up a threadid callback on this platform. */
-void ssl_util_thread_id_setup(apr_pool_t *p) { }
+void ssl_util_thread_id_setup(apr_pool_t *p)
+{
+    ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, p, APLOGNO()
+                  "using builtin threadid callback for OpenSSL");
+}
 
 #else
 
@@ -434,10 +438,16 @@ static apr_status_t ssl_util_thr_id_cleanup(void *old)
 void ssl_util_thread_id_setup(apr_pool_t *p)
 {
 #if HAVE_CRYPTO_SET_ID_CALLBACK
+    ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, p, APLOGNO()
+                  "using deprecated CRYPTO_set_id_callback for OpenSSL");
+
     /* This API is deprecated, but we prefer it to its replacement since it
      * allows us to unset the callback when this module is being unloaded. */
     CRYPTO_set_id_callback(ssl_util_thr_id);
 #else
+    ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, p, APLOGNO()
+                  "using dangerous CRYPTO_THREADID_set_callback for OpenSSL");
+
     /* This is a last resort. We can only set this once, which means that we'd
      * better not get loaded into a different address during a restart. See
      * PR60947. */