diff options
author | Yann Ylavic <ylavic@apache.org> | 2017-07-30 01:05:02 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2017-07-30 01:05:02 +0200 |
commit | 31a410365282e05a491d7ede075315514db7587d (patch) | |
tree | 31b8be774ef0fe711192287c0f6a2dc9299f0943 /modules/ssl/ssl_engine_io.c | |
parent | mod_ssl: we can't use SSL_COMP_free_compression_methods() if OPENSSL_NO_COMP (diff) | |
download | apache2-31a410365282e05a491d7ede075315514db7587d.tar.xz apache2-31a410365282e05a491d7ede075315514db7587d.zip |
mod_ssl, ab: compatibility with LibreSSL. PR 61184.
LibreSSL defines OPENSSL_VERSION_NUMBER = 2.0, but is not compatible with
all of the latest OpenSSL 1.1 API.
Address this by defining MODSSL_USE_OPENSSL_PRE_1_1_API which is true for
anything but OpenSSL >= 1.1 (for now).
Proposed by: Bernard Spil <brnrd freebsd.org>
Reviewed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1803396 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_engine_io.c')
-rw-r--r-- | modules/ssl/ssl_engine_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index d75a1ccba8..1079d1598e 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -165,7 +165,7 @@ static int bio_filter_create(BIO *bio) { BIO_set_shutdown(bio, 1); BIO_set_init(bio, 1); -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if MODSSL_USE_OPENSSL_PRE_1_1_API /* No setter method for OpenSSL 1.1.0 available, * but I can't find any functional use of the * "num" field there either. @@ -578,7 +578,7 @@ static long bio_filter_in_ctrl(BIO *bio, int cmd, long num, void *ptr) return -1; } -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if MODSSL_USE_OPENSSL_PRE_1_1_API static BIO_METHOD bio_filter_out_method = { BIO_TYPE_MEM, @@ -2080,7 +2080,7 @@ static void ssl_io_input_add_filter(ssl_filter_ctx_t *filter_ctx, conn_rec *c, filter_ctx->pInputFilter = ap_add_input_filter(ssl_io_filter, inctx, r, c); -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if MODSSL_USE_OPENSSL_PRE_1_1_API filter_ctx->pbioRead = BIO_new(&bio_filter_in_method); #else filter_ctx->pbioRead = BIO_new(bio_filter_in_method); @@ -2115,7 +2115,7 @@ void ssl_io_filter_init(conn_rec *c, request_rec *r, SSL *ssl) filter_ctx->pOutputFilter = ap_add_output_filter(ssl_io_filter, filter_ctx, r, c); -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if MODSSL_USE_OPENSSL_PRE_1_1_API filter_ctx->pbioWrite = BIO_new(&bio_filter_out_method); #else filter_ctx->pbioWrite = BIO_new(bio_filter_out_method); |