]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commit
SSL: support for compressed server certificates with OpenSSL.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 9 Jul 2025 15:02:09 +0000 (19:02 +0400)
committerpluknet <pluknet@nginx.com>
Sun, 3 Aug 2025 15:15:16 +0000 (19:15 +0400)
commit251444fcf4434bfddbe3394a568c51d4f7bd857f
tree0ce5a7855799986f3370c93aba5a2cf8cf43134f
parented99269eed283e474590bbe951bad1d74b721955
SSL: support for compressed server certificates with OpenSSL.

The ssl_certificate_compression directive allows to send compressed
server certificates.  In OpenSSL, they are pre-compressed on startup.
To simplify configuration, the SSL_OP_NO_TX_CERTIFICATE_COMPRESSION
option is automatically cleared if certificates were pre-compressed.

SSL_CTX_compress_certs() may return an error in legitimate cases,
e.g., when none of compression algorithms is available or if the
resulting compressed size is larger than the original one, thus it
is silently ignored.

Certificate compression is supported in Chrome with brotli only,
in Safari with zlib only, and in Firefox with all listed algorithms.
It is supported since Ubuntu 24.10, which has OpenSSL with enabled
zlib and zstd support.

The actual list of algorithms supported in OpenSSL depends on how
the library was configured; it can be brotli, zlib, zstd as listed
in RFC 8879.
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.h
src/http/modules/ngx_http_ssl_module.c
src/http/modules/ngx_http_ssl_module.h
src/mail/ngx_mail_ssl_module.c
src/mail/ngx_mail_ssl_module.h
src/stream/ngx_stream_ssl_module.c
src/stream/ngx_stream_ssl_module.h