comparison src/http/ngx_http_upstream.c @ 8042:c7e25324be11

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).
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 07 Jun 2022 20:08:57 +0400
parents 0784ab86ad08
children 8d0753760546
comparison
equal deleted inserted replaced
8041:0784ab86ad08 8042:c7e25324be11
1688 NGX_HTTP_INTERNAL_SERVER_ERROR); 1688 NGX_HTTP_INTERNAL_SERVER_ERROR);
1689 return; 1689 return;
1690 } 1690 }
1691 } 1691 }
1692 1692
1693 if (u->conf->ssl_certificate && (u->conf->ssl_certificate->lengths 1693 if (u->conf->ssl_certificate
1694 || u->conf->ssl_certificate_key->lengths)) 1694 && u->conf->ssl_certificate->value.len
1695 && (u->conf->ssl_certificate->lengths
1696 || u->conf->ssl_certificate_key->lengths))
1695 { 1697 {
1696 if (ngx_http_upstream_ssl_certificate(r, u, c) != NGX_OK) { 1698 if (ngx_http_upstream_ssl_certificate(r, u, c) != NGX_OK) {
1697 ngx_http_upstream_finalize_request(r, u, 1699 ngx_http_upstream_finalize_request(r, u,
1698 NGX_HTTP_INTERNAL_SERVER_ERROR); 1700 NGX_HTTP_INTERNAL_SERVER_ERROR);
1699 return; 1701 return;