From 52b59ebc749596f88592f576f5fd2e1010612786 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 27 Sep 2012 18:01:06 +0000 Subject: [PATCH] SSL: added version checks for ssl compression workaround. The SSL_COMP_get_compression_methods() is only available as an API function in OpenSSL 0.9.8+, require it explicitly to unbreak build with OpenSSL 0.9.7. --- src/event/ngx_event_openssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 93d3f651b..5e25b0156 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -94,6 +94,7 @@ ngx_ssl_init(ngx_log_t *log) OpenSSL_add_all_algorithms(); +#if OPENSSL_VERSION_NUMBER >= 0x0090800fL #ifndef SSL_OP_NO_COMPRESSION { /* @@ -110,6 +111,7 @@ ngx_ssl_init(ngx_log_t *log) (void) sk_SSL_COMP_pop(ssl_comp_methods); } } +#endif #endif ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);