summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2025-07-15 15:55:26 +0400
committerpluknet <pluknet@nginx.com>2025-08-03 19:15:16 +0400
commited99269eed283e474590bbe951bad1d74b721955 (patch)
treecc991ccdd435a59e868bb1d355ed6d85afa91e04 /src/event
parentf4005126d78d19f1efd4f8fb4cad916d8976d97a (diff)
downloadnginx-ed99269eed283e474590bbe951bad1d74b721955.tar.gz
nginx-ed99269eed283e474590bbe951bad1d74b721955.tar.bz2
SSL: disabled certificate compression by default with OpenSSL.
Certificate compression is supported since OpenSSL 3.2, it is enabled automatically as negotiated in a TLSv1.3 handshake. Using certificate compression and decompression in runtime may be suboptimal in terms of CPU and memory consumption in certain typical scenarios, hence it is disabled by default on both server and client sides. It can be enabled with ssl_conf_command and similar directives in upstream as appropriate, for example: ssl_conf_command Options RxCertificateCompression; ssl_conf_command Options TxCertificateCompression; Compressing server certificates requires additional support, this is addressed separately.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/ngx_event_openssl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index ff604c562..0c23c3f2f 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -387,6 +387,11 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data)
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_COMPRESSION);
#endif
+#ifdef SSL_OP_NO_TX_CERTIFICATE_COMPRESSION
+ SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_TX_CERTIFICATE_COMPRESSION);
+ SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_RX_CERTIFICATE_COMPRESSION);
+#endif
+
#ifdef SSL_OP_NO_ANTI_REPLAY
SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_ANTI_REPLAY);
#endif