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:
authorSergey Kandaurov <pluknet@nginx.com>2018-01-30 17:46:31 +0300
committerSergey Kandaurov <pluknet@nginx.com>2018-01-30 17:46:31 +0300
commit57dde2ab37708423d97333be19830437732b3f4f (patch)
tree505c109fc4a38ba9062a2ce67a5df974d4b06d5b /src/http/ngx_http_request.c
parent22136953689e4f48c2bc90a01f39e23a4b6428af (diff)
SSL: using default server context in session remove (closes #1464).
This fixes segfault in configurations with multiple virtual servers sharing the same port, where a non-default virtual server block misses certificate.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 5668bf441..a2663f015 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1902,7 +1902,7 @@ ngx_http_process_request(ngx_http_request_t *r)
"client SSL certificate verify error: (%l:%s)",
rc, X509_verify_cert_error_string(rc));
- ngx_ssl_remove_cached_session(sscf->ssl.ctx,
+ ngx_ssl_remove_cached_session(c->ssl->session_ctx,
(SSL_get0_session(c->ssl->connection)));
ngx_http_finalize_request(r, NGX_HTTPS_CERT_ERROR);
@@ -1916,7 +1916,7 @@ ngx_http_process_request(ngx_http_request_t *r)
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"client sent no required SSL certificate");
- ngx_ssl_remove_cached_session(sscf->ssl.ctx,
+ ngx_ssl_remove_cached_session(c->ssl->session_ctx,
(SSL_get0_session(c->ssl->connection)));
ngx_http_finalize_request(r, NGX_HTTPS_NO_CERT);