diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2022-06-07 20:08:57 +0400 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2022-06-07 20:08:57 +0400 |
commit | f08dbefadf083b8546423e35d8d12ba27e46efa8 (patch) | |
tree | 99d913ae524b0e67c2c97c8cd322fa319f9bfe51 /src/http/ngx_http_upstream.c | |
parent | 8df3ad13c5bb10360221f25ca45ae03dd09e1c3b (diff) | |
download | nginx-f08dbefadf083b8546423e35d8d12ba27e46efa8.tar.gz nginx-f08dbefadf083b8546423e35d8d12ba27e46efa8.zip |
Upstream: handling of certificates specified as an empty string.
Now, if the directive is given an empty string, such configuration cancels
loading of certificates, in particular, if they would be otherwise inherited
from the previous level. This restores previous behaviour, before variables
support in certificates was introduced (3ab8e1e2f0f7).
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index ead371556..3ae822bb8 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1690,8 +1690,10 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r, } } - if (u->conf->ssl_certificate && (u->conf->ssl_certificate->lengths - || u->conf->ssl_certificate_key->lengths)) + if (u->conf->ssl_certificate + && u->conf->ssl_certificate->value.len + && (u->conf->ssl_certificate->lengths + || u->conf->ssl_certificate_key->lengths)) { if (ngx_http_upstream_ssl_certificate(r, u, c) != NGX_OK) { ngx_http_upstream_finalize_request(r, u, |