Author: stsp Date: Sat Feb 4 11:57:44 2017 New Revision: 1781658 URL: http://svn.apache.org/viewvc?rev=1781658&view=rev Log: Fix 'scons check' build with LibreSSL.
* test/MockHTTPinC/MockHTTP_server.c (USE_LEGACY_OPENSSL): Remove this definition. (bio_apr_socket_create, bio_set_data, bio_get_data, bio_apr_socket_method, bio_meth_apr_socket_new, bio_meth_free): Check SERF_NO_SSL_BIO_WRAPPERS instead of USE_LEGACY_OPENSSL. (initSSLCtx): Check SERF_HAVE_OPENSSL_MALLOC_INIT, not USE_LEGACY_OPENSSL. Modified: serf/trunk/test/MockHTTPinC/MockHTTP_server.c Modified: serf/trunk/test/MockHTTPinC/MockHTTP_server.c URL: http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_server.c?rev=1781658&r1=1781657&r2=1781658&view=diff ============================================================================== --- serf/trunk/test/MockHTTPinC/MockHTTP_server.c (original) +++ serf/trunk/test/MockHTTPinC/MockHTTP_server.c Sat Feb 4 11:57:44 2017 @@ -2239,10 +2239,6 @@ mhSetServerEnableOCSP(mhServCtx_t *ctx) #include <openssl/ssl.h> #include <openssl/err.h> -#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L -#define USE_LEGACY_OPENSSL -#endif - struct sslCtx_t { bool handshake_done; bool renegotiate; @@ -2278,7 +2274,7 @@ static int pem_passwd_cb(char *buf, int */ static int bio_apr_socket_create(BIO *bio) { -#ifndef USE_LEGACY_OPENSSL +#ifndef SERF_NO_SSL_BIO_WRAPPERS BIO_set_shutdown(bio, 1); BIO_set_init(bio, 1); BIO_set_data(bio, NULL); @@ -2294,7 +2290,7 @@ static int bio_apr_socket_create(BIO *bi static void bio_set_data(BIO *bio, void *data) { -#ifndef USE_LEGACY_OPENSSL +#ifndef SERF_NO_SSL_BIO_WRAPPERS BIO_set_data(bio, data); #else bio->ptr = data; @@ -2303,7 +2299,7 @@ static void bio_set_data(BIO *bio, void static void *bio_get_data(BIO *bio) { -#ifndef USE_LEGACY_OPENSSL +#ifndef SERF_NO_SSL_BIO_WRAPPERS return BIO_get_data(bio); #else return bio->ptr; @@ -2404,7 +2400,7 @@ static int bio_apr_socket_write(BIO *bio } -#ifdef USE_LEGACY_OPENSSL +#ifdef SERF_NO_SSL_BIO_WRAPPERS static BIO_METHOD bio_apr_socket_method = { BIO_TYPE_SOCKET, "APR sockets", @@ -2425,7 +2421,7 @@ static BIO_METHOD *bio_meth_apr_socket_n { BIO_METHOD *biom = NULL; -#ifndef USE_LEGACY_OPENSSL +#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); @@ -2443,7 +2439,7 @@ static BIO_METHOD *bio_meth_apr_socket_n static void bio_meth_free(BIO_METHOD *biom) { -#ifndef USE_LEGACY_OPENSSL +#ifndef SERF_NO_SSL_BIO_WRAPPERS BIO_meth_free(biom); #endif } @@ -2672,7 +2668,7 @@ static apr_status_t initSSLCtx(_mhClient /* Init OpenSSL globally */ if (!init_done) { -#ifndef USE_LEGACY_OPENSSL +#ifdef SERF_HAVE_OPENSSL_MALLOC_INIT OPENSSL_malloc_init(); #else CRYPTO_malloc_init();