Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 6901:72bb626484a4
SSL: fixed ssl_buffer_size on SNI virtual hosts (ticket #1192).
Previously, buffer size was not changed from the one saved during
initial ngx_ssl_create_connection(), even if the buffer itself was not
yet created. Fix is to change c->ssl->buffer_size in the SNI callback.
Note that it should be also possible to update buffer size even in non-SNI
virtual hosts as long as the buffer is not yet allocated. This looks
like an overcomplication though.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 02 Feb 2017 20:29:16 +0300 |
parents | 690b15cc8915 |
children | e662cbf1b932 |
comparison
equal
deleted
inserted
replaced
6900:22cd2ce9fb44 | 6901:72bb626484a4 |
---|---|
882 | 882 |
883 ngx_set_connection_log(c, clcf->error_log); | 883 ngx_set_connection_log(c, clcf->error_log); |
884 | 884 |
885 sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_ssl_module); | 885 sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_ssl_module); |
886 | 886 |
887 c->ssl->buffer_size = sscf->buffer_size; | |
888 | |
887 if (sscf->ssl.ctx) { | 889 if (sscf->ssl.ctx) { |
888 SSL_set_SSL_CTX(ssl_conn, sscf->ssl.ctx); | 890 SSL_set_SSL_CTX(ssl_conn, sscf->ssl.ctx); |
889 | 891 |
890 /* | 892 /* |
891 * SSL_set_SSL_CTX() only changes certs as of 1.0.0d | 893 * SSL_set_SSL_CTX() only changes certs as of 1.0.0d |