Klaus Demo nginx / 57dde2a
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. Sergey Kandaurov 4 years ago
3 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
19011901 "client SSL certificate verify error: (%l:%s)",
19021902 rc, X509_verify_cert_error_string(rc));
19031903
1904 ngx_ssl_remove_cached_session(sscf->ssl.ctx,
1904 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
19051905 (SSL_get0_session(c->ssl->connection)));
19061906
19071907 ngx_http_finalize_request(r, NGX_HTTPS_CERT_ERROR);
19151915 ngx_log_error(NGX_LOG_INFO, c->log, 0,
19161916 "client sent no required SSL certificate");
19171917
1918 ngx_ssl_remove_cached_session(sscf->ssl.ctx,
1918 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
19191919 (SSL_get0_session(c->ssl->connection)));
19201920
19211921 ngx_http_finalize_request(r, NGX_HTTPS_NO_CERT);
301301 "client SSL certificate verify error: (%l:%s)",
302302 rc, X509_verify_cert_error_string(rc));
303303
304 ngx_ssl_remove_cached_session(sslcf->ssl.ctx,
304 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
305305 (SSL_get0_session(c->ssl->connection)));
306306
307307 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
322322 ngx_log_error(NGX_LOG_INFO, c->log, 0,
323323 "client sent no required SSL certificate");
324324
325 ngx_ssl_remove_cached_session(sslcf->ssl.ctx,
325 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
326326 (SSL_get0_session(c->ssl->connection)));
327327
328328 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
327327 "client SSL certificate verify error: (%l:%s)",
328328 rc, X509_verify_cert_error_string(rc));
329329
330 ngx_ssl_remove_cached_session(sslcf->ssl.ctx,
330 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
331331 (SSL_get0_session(c->ssl->connection)));
332332 return NGX_ERROR;
333333 }
339339 ngx_log_error(NGX_LOG_INFO, c->log, 0,
340340 "client sent no required SSL certificate");
341341
342 ngx_ssl_remove_cached_session(sslcf->ssl.ctx,
342 ngx_ssl_remove_cached_session(c->ssl->session_ctx,
343343 (SSL_get0_session(c->ssl->connection)));
344344 return NGX_ERROR;
345345 }