]> git.kaiwu.me - nginx.git/commitdiff
SSL: disabled using certificate compression with OCSP stapling.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 2 Oct 2025 11:22:24 +0000 (15:22 +0400)
committerpluknet <s.kandaurov@f5.com>
Wed, 8 Oct 2025 15:56:41 +0000 (19:56 +0400)
OCSP response in TLSv1.3 is sent in the Certificate message.  This
is incompatible with pre-compression of the configured certificates.

src/http/modules/ngx_http_ssl_module.c
src/stream/ngx_stream_ssl_module.c

index 3778758e275404e96c07f238b924532dbf797ba4..7a6f49c3f66d0d06a3f7c31bbcf9d8909e98688c 100644 (file)
@@ -910,13 +910,19 @@ ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
 
     if (conf->stapling) {
 
+        if (conf->certificate_compression) {
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                          "\"ssl_stapling\" is incompatible with "
+                          "\"ssl_certificate_compression\"");
+            return NGX_CONF_ERROR;
+        }
+
         if (ngx_ssl_stapling(cf, &conf->ssl, &conf->stapling_file,
                              &conf->stapling_responder, conf->stapling_verify)
             != NGX_OK)
         {
             return NGX_CONF_ERROR;
         }
-
     }
 
     if (ngx_ssl_early_data(cf, &conf->ssl, conf->early_data) != NGX_OK) {
index 75938b0a2bfbe47992f2ed3a41ee20beecf4b8a3..73dfceecdd306918241e148769347786e36c2549 100644 (file)
@@ -1155,13 +1155,19 @@ ngx_stream_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
 
     if (conf->stapling) {
 
+        if (conf->certificate_compression) {
+            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                          "\"ssl_stapling\" is incompatible with "
+                          "\"ssl_certificate_compression\"");
+            return NGX_CONF_ERROR;
+        }
+
         if (ngx_ssl_stapling(cf, &conf->ssl, &conf->stapling_file,
                              &conf->stapling_responder, conf->stapling_verify)
             != NGX_OK)
         {
             return NGX_CONF_ERROR;
         }
-
     }
 
     if (ngx_ssl_conf_commands(cf, &conf->ssl, conf->conf_commands) != NGX_OK) {