Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2019-02-25 21:16:26 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2019-02-25 21:16:26 +0300
commit1a30d79c429cb1d4438d592db62cbe701e3b4360 (patch)
tree230b57e48c8b2c75e5135db370bc7ae8e9f0ecd5 /src/http/ngx_http_request.c
parentecfab06cb20959219c9aadc2ef59507488e4fa99 (diff)
SSL: fixed possible segfault with dynamic certificates.
A virtual server may have no SSL context if it does not have certificates defined, so we have to use config of the ngx_http_ssl_module from the SSL context in the certificate callback. To do so, it is now passed as the argument of the callback. The stream module doesn't really need any changes, but was modified as well to match http code.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 81d546a86..40973b2e2 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -973,7 +973,7 @@ ngx_http_ssl_certificate(ngx_ssl_conn_t *ssl_conn, void *arg)
r->logged = 1;
- sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module);
+ sscf = arg;
nelts = sscf->certificate_values->nelts;
certs = sscf->certificate_values->elts;