[nginx] svn commit: r4902 - in branches/stable-1.2: . src/event
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Nov 12 18:00:33 UTC 2012
Author: mdounin
Date: 2012-11-12 18:00:32 +0000 (Mon, 12 Nov 2012)
New Revision: 4902
URL: http://trac.nginx.org/nginx/changeset/4902/nginx
Log:
Merge of r4868, r4869: SSL minor fixes.
*) SSL: fixed compression workaround to remove all methods.
Previous code used sk_SSL_COMP_delete(ssl_comp_methods, i) while iterating
stack from 0 to n, resulting in removal of only even compression methods.
In real life this change is a nop, as there is only one compression method
which is enabled by default in OpenSSL.
*) 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.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/event/ngx_event_openssl.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-11-12 17:57:57 UTC (rev 4901)
+++ branches/stable-1.2 2012-11-12 18:00:32 UTC (rev 4902)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4867
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4869
\ No newline at end of property
Modified: branches/stable-1.2/src/event/ngx_event_openssl.c
===================================================================
--- branches/stable-1.2/src/event/ngx_event_openssl.c 2012-11-12 17:57:57 UTC (rev 4901)
+++ branches/stable-1.2/src/event/ngx_event_openssl.c 2012-11-12 18:00:32 UTC (rev 4902)
@@ -94,23 +94,25 @@
OpenSSL_add_all_algorithms();
+#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
#ifndef SSL_OP_NO_COMPRESSION
{
/*
* Disable gzip compression in OpenSSL prior to 1.0.0 version,
* this saves about 522K per connection.
*/
- int i, n;
+ int n;
STACK_OF(SSL_COMP) *ssl_comp_methods;
ssl_comp_methods = SSL_COMP_get_compression_methods();
n = sk_SSL_COMP_num(ssl_comp_methods);
- for (i = 0; i < n; i++) {
- (void) sk_SSL_COMP_delete(ssl_comp_methods, i);
+ while (n--) {
+ (void) sk_SSL_COMP_pop(ssl_comp_methods);
}
}
#endif
+#endif
ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
More information about the nginx-devel
mailing list