Mercurial > hg > nginx-quic
comparison src/event/ngx_event_openssl.c @ 4696:b43fe2deb053
Disabled gzip compression in OpenSSL prior to 1.0.0 version.
This saves about 522K per connection.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 20 Jun 2012 12:55:28 +0000 |
parents | 3797a44d1fa9 |
children | 90bbf2adb2c9 a0cb7fc23cc2 |
comparison
equal
deleted
inserted
replaced
4695:441b2941a506 | 4696:b43fe2deb053 |
---|---|
91 | 91 |
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 | |
97 #ifndef SSL_OP_NO_COMPRESSION | |
98 { | |
99 /* | |
100 * Disable gzip compression in OpenSSL prior to 1.0.0 version, | |
101 * this saves about 522K per connection. | |
102 */ | |
103 int i, n; | |
104 STACK_OF(SSL_COMP) *ssl_comp_methods; | |
105 | |
106 ssl_comp_methods = SSL_COMP_get_compression_methods(); | |
107 n = sk_SSL_COMP_num(ssl_comp_methods); | |
108 | |
109 for (i = 0; i < n; i++) { | |
110 (void) sk_SSL_COMP_delete(ssl_comp_methods, i); | |
111 } | |
112 } | |
113 #endif | |
96 | 114 |
97 ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); | 115 ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); |
98 | 116 |
99 if (ngx_ssl_connection_index == -1) { | 117 if (ngx_ssl_connection_index == -1) { |
100 ngx_ssl_error(NGX_LOG_ALERT, log, 0, "SSL_get_ex_new_index() failed"); | 118 ngx_ssl_error(NGX_LOG_ALERT, log, 0, "SSL_get_ex_new_index() failed"); |