serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1781660 - /serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c
Date Sat, 04 Feb 2017 12:06:38 GMT
Author: stsp
Date: Sat Feb  4 12:06:38 2017
New Revision: 1781660

URL: http://svn.apache.org/viewvc?rev=1781660&view=rev
Log:
On the 1.3.x-sslbuild branch, fix 'scons check' build with LibreSSL.

* test/server/test_sslserver.c
  (USE_OPENSSL_1_1_API): Remove this definition.
  (bio_set_data, bio_get_data, bio_apr_socket_create,
   bio_meth_apr_socket_new, cleanup_https_server): Use SERF_NO_SSL_BIO_WRAPPERS
    instead of USE_OPENSSL_1_1_API.
  (init_ssl_context): Use SERF_HAVE_OPENSSL_MALLOC_INIT instead.

Modified:
    serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c

Modified: serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c
URL: http://svn.apache.org/viewvc/serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c?rev=1781660&r1=1781659&r2=1781660&view=diff
==============================================================================
--- serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c (original)
+++ serf/branches/1.3.x-sslbuild/test/server/test_sslserver.c Sat Feb  4 12:06:38 2017
@@ -27,10 +27,6 @@
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 
-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
-#define USE_OPENSSL_1_1_API
-#endif
-
 static int init_done = 0;
 
 typedef struct ssl_context_t {
@@ -52,7 +48,7 @@ static int pem_passwd_cb(char *buf, int
 
 static void bio_set_data(BIO *bio, void *data)
 {
-#ifdef USE_OPENSSL_1_1_API
+#ifndef SERF_NO_SSL_BIO_WRAPPERS
     BIO_set_data(bio, data);
 #else
     bio->ptr = data;
@@ -61,7 +57,7 @@ static void bio_set_data(BIO *bio, void
 
 static void *bio_get_data(BIO *bio)
 {
-#ifdef USE_OPENSSL_1_1_API
+#ifndef SERF_NO_SSL_BIO_WRAPPERS
     return BIO_get_data(bio);
 #else
     return bio->ptr;
@@ -70,7 +66,7 @@ static void *bio_get_data(BIO *bio)
 
 static int bio_apr_socket_create(BIO *bio)
 {
-#ifdef USE_OPENSSL_1_1_API
+#ifndef SERF_NO_SSL_BIO_WRAPPERS
     BIO_set_shutdown(bio, 1);
     BIO_set_init(bio, 1);
     BIO_set_data(bio, NULL);
@@ -179,7 +175,7 @@ static BIO_METHOD *bio_meth_apr_socket_n
 {
     BIO_METHOD *biom = NULL;
 
-#ifdef USE_OPENSSL_1_1_API
+#ifndef SERF_NO_SSL_BIO_WRAPPERS
     biom = BIO_meth_new(BIO_TYPE_SOCKET, "APR sockets");
     if (biom) {
         BIO_meth_set_write(biom, bio_apr_socket_write);
@@ -228,7 +224,7 @@ init_ssl_context(serv_ctx_t *serv_ctx,
     /* Init OpenSSL globally */
     if (!init_done)
     {
-#ifdef USE_OPENSSL_1_1_API
+#ifdef SERF_HAVE_OPENSSL_MALLOC_INIT
         OPENSSL_malloc_init();
 #else
         CRYPTO_malloc_init();
@@ -446,7 +442,7 @@ static apr_status_t cleanup_https_server
     if (ssl_ctx) {
         if (ssl_ctx->ssl) {
           SSL_clear(ssl_ctx->ssl);
-#ifdef USE_OPENSSL_1_1_API
+#ifndef SERF_NO_SSL_BIO_WRAPPERS
           BIO_meth_free(ssl_ctx->biom);
 #endif
         }



Mime
View raw message