commit | 0f8c7efbacd19f24c586b4f29d80dcc3eff551eb | [log] [tgz] |
---|---|---|
author | Piotr Sikora <piotrsikora@google.com> | Sun Jun 10 09:19:18 2018 +0000 |
committer | Piotr Sikora <piotrsikora@google.com> | Tue Oct 23 03:09:25 2018 +0000 |
tree | 1e2f5b2576337f76fbe6e513b38fa508bafc1229 | |
parent | 64e8587513d4b6b1a0d6f4d68b1ac61b94029e12 [diff] |
SSL: optimized updates of SSL context. Previously, unnecessary updates of SSL context could have happened when selected server didn't change, e.g. when it was the default server. Change-Id: Idd36f5c37011bb25164aa27b6ed7796007f022a5 Signed-off-by: Piotr Sikora <piotrsikora@google.com> Reviewed-on: https://nginx-review.googlesource.com/c/3460
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 1b00efd..364067f 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c
@@ -899,7 +899,7 @@ c->ssl->buffer_size = sscf->buffer_size; - if (sscf->ssl.ctx) { + if (sscf->ssl.ctx && sscf->ssl.ctx != SSL_get_SSL_CTX(ssl_conn)) { SSL_set_SSL_CTX(ssl_conn, sscf->ssl.ctx); /*