serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1775253 - in /serf/trunk: SConstruct buckets/ssl_buckets.c
Date Tue, 20 Dec 2016 10:36:34 GMT
Author: stsp
Date: Tue Dec 20 10:36:34 2016
New Revision: 1775253

URL: http://svn.apache.org/viewvc?rev=1775253&view=rev
Log:
* SConstruct: Add a check for thread locking callbacks which were apparently
    removed in OpenSSL 1.1.0. Provide SERF_HAVE_SSL_LOCKING_CALLBACKS.

* buckets/ssl_buckets.c: Use SERF_HAVE_SSL_LOCKING_CALLBACKS instead of
    USE_LEGACY_OPENSSL.

Modified:
    serf/trunk/SConstruct
    serf/trunk/buckets/ssl_buckets.c

Modified: serf/trunk/SConstruct
URL: http://svn.apache.org/viewvc/serf/trunk/SConstruct?rev=1775253&r1=1775252&r2=1775253&view=diff
==============================================================================
--- serf/trunk/SConstruct (original)
+++ serf/trunk/SConstruct Tue Dec 20 10:36:34 2016
@@ -422,6 +422,8 @@ if not conf.CheckFunc('BIO_set_init'):
   env.Append(CPPDEFINES=['SERF_NO_SSL_BIO_WRAPPERS'])
 if not conf.CheckFunc('X509_STORE_get0_param'):
   env.Append(CPPDEFINES=['SERF_NO_SSL_X509_STORE_WRAPPERS'])
+if conf.CheckFunc('CRYPTO_set_locking_callback'):
+  env.Append(CPPDEFINES=['SERF_HAVE_SSL_LOCKING_CALLBACKS'])
 if conf.CheckFunc('OPENSSL_malloc_init'):
   env.Append(CPPDEFINES=['SERF_HAVE_OPENSSL_MALLOC_INIT'])
 env = conf.Finish()

Modified: serf/trunk/buckets/ssl_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/buckets/ssl_buckets.c?rev=1775253&r1=1775252&r2=1775253&view=diff
==============================================================================
--- serf/trunk/buckets/ssl_buckets.c (original)
+++ serf/trunk/buckets/ssl_buckets.c Tue Dec 20 10:36:34 2016
@@ -1319,7 +1319,7 @@ static apr_status_t ssl_encrypt(void *ba
     return status;
 }
 
-#if APR_HAS_THREADS && defined(USE_LEGACY_OPENSSL)
+#if APR_HAS_THREADS && defined(SERF_HAVE_SSL_LOCKING_CALLBACKS)
 static apr_pool_t *ssl_pool;
 static apr_thread_mutex_t **ssl_locks;
 
@@ -1406,7 +1406,7 @@ static void init_ssl_libraries(void)
     val = apr_atomic_cas32(&have_init_ssl, INIT_BUSY, INIT_UNINITIALIZED);
 
     if (!val) {
-#if APR_HAS_THREADS && defined(USE_LEGACY_OPENSSL)
+#if APR_HAS_THREADS && defined(SERF_HAVE_SSL_LOCKING_CALLBACKS)
         int i, numlocks;
 #endif
 
@@ -1433,7 +1433,7 @@ static void init_ssl_libraries(void)
         SSL_library_init();
         OpenSSL_add_all_algorithms();
 
-#if APR_HAS_THREADS && defined(USE_LEGACY_OPENSSL)
+#if APR_HAS_THREADS && defined(SERF_HAVE_SSL_LOCKING_CALLBACKS)
         numlocks = CRYPTO_num_locks();
         apr_pool_create(&ssl_pool, NULL);
         ssl_locks = apr_palloc(ssl_pool, sizeof(apr_thread_mutex_t*)*numlocks);



Mime
View raw message