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/modules/ngx_http_grpc_module.c | |
| parent | 8df3ad13c5bb10360221f25ca45ae03dd09e1c3b (diff) | |
| download | nginx-f08dbefadf083b8546423e35d8d12ba27e46efa8.tar.gz nginx-f08dbefadf083b8546423e35d8d12ba27e46efa8.tar.bz2 | |
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/modules/ngx_http_grpc_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_grpc_module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c index a64658f72..617814ec9 100644 --- a/src/http/modules/ngx_http_grpc_module.c +++ b/src/http/modules/ngx_http_grpc_module.c @@ -4906,8 +4906,9 @@ ngx_http_grpc_set_ssl(ngx_conf_t *cf, ngx_http_grpc_loc_conf_t *glcf) return NGX_ERROR; } - if (glcf->upstream.ssl_certificate) { - + if (glcf->upstream.ssl_certificate + && glcf->upstream.ssl_certificate->value.len) + { if (glcf->upstream.ssl_certificate_key == NULL) { ngx_log_error(NGX_LOG_EMERG, cf->log, 0, "no \"grpc_ssl_certificate_key\" is defined " |
