summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-10-07 10:59:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-10-07 10:59:02 +0000
commit95084f7e1c14333c3ee1cb58f496924206001ecd (patch)
tree88adad82cd277b860c038f1b963dffe579a0f8fc /src
parent3f34960fde2c73dac317a2e6ba514c9fc32cb1de (diff)
downloadnginx-95084f7e1c14333c3ee1cb58f496924206001ecd.tar.gz
nginx-95084f7e1c14333c3ee1cb58f496924206001ecd.tar.bz2
Disabling SSL compression. This saves about 300K per SSL connection.
The SSL_OP_NO_COMPRESSION option is available since OpenSSL 1.0.0.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_openssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 259b1d8f2..aa9a4c96a 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -175,6 +175,10 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data)
SSL_CTX_set_options(ssl->ctx, ngx_ssl_protocols[protocols >> 1]);
}
+#ifdef SSL_OP_NO_COMPRESSION
+ SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_COMPRESSION);
+#endif
+
SSL_CTX_set_read_ahead(ssl->ctx, 1);
SSL_CTX_set_info_callback(ssl->ctx, ngx_ssl_info_callback);