[PATCH] Upstream: handling of certificates specified as an empty string

Sergey Kandaurov pluknet at nginx.com
Mon May 30 22:54:28 UTC 2022


> On 27 May 2022, at 08:26, Pavel Pautov via nginx-devel <nginx-devel at nginx.org> wrote:
> 
> Hi,
> 
> Shall we restore original behavior for stream proxy as well?
> 

Fixed, tnx.  The relevant part:

diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c
--- a/src/stream/ngx_stream_proxy_module.c
+++ b/src/stream/ngx_stream_proxy_module.c
@@ -2244,7 +2244,7 @@ ngx_stream_proxy_set_ssl(ngx_conf_t *cf,
                 return NGX_ERROR;
             }
 
-        } else {
+        } else if (pscf->ssl_certificate->value.len) {
             if (ngx_ssl_certificate(cf, pscf->ssl,
                                     &pscf->ssl_certificate->value,
                                     &pscf->ssl_certificate_key->value,

-- 
Sergey Kandaurov



More information about the nginx-devel mailing list