]> git.kaiwu.me - nginx.git/commitdiff
SSL: added version checks for ssl compression workaround.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 27 Sep 2012 18:01:06 +0000 (18:01 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 27 Sep 2012 18:01:06 +0000 (18:01 +0000)
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

index 93d3f651be0970e72a8b12d96eba4424dad6cb99..5e25b0156c6d6722879c48ed6c708e9ea144a096 100644 (file)
@@ -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);