Mercurial > hg > nginx-quic
comparison src/event/ngx_event_openssl.c @ 4868:22a6ef66b6f5
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 27 Sep 2012 18:01:06 +0000 |
parents | 90bbf2adb2c9 |
children | 7c3cca603438 |
comparison
equal
deleted
inserted
replaced
4867:90bbf2adb2c9 | 4868:22a6ef66b6f5 |
---|---|
92 SSL_library_init(); | 92 SSL_library_init(); |
93 SSL_load_error_strings(); | 93 SSL_load_error_strings(); |
94 | 94 |
95 OpenSSL_add_all_algorithms(); | 95 OpenSSL_add_all_algorithms(); |
96 | 96 |
97 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL | |
97 #ifndef SSL_OP_NO_COMPRESSION | 98 #ifndef SSL_OP_NO_COMPRESSION |
98 { | 99 { |
99 /* | 100 /* |
100 * Disable gzip compression in OpenSSL prior to 1.0.0 version, | 101 * Disable gzip compression in OpenSSL prior to 1.0.0 version, |
101 * this saves about 522K per connection. | 102 * this saves about 522K per connection. |
108 | 109 |
109 while (n--) { | 110 while (n--) { |
110 (void) sk_SSL_COMP_pop(ssl_comp_methods); | 111 (void) sk_SSL_COMP_pop(ssl_comp_methods); |
111 } | 112 } |
112 } | 113 } |
114 #endif | |
113 #endif | 115 #endif |
114 | 116 |
115 ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); | 117 ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); |
116 | 118 |
117 if (ngx_ssl_connection_index == -1) { | 119 if (ngx_ssl_connection_index == -1) { |