From 0d7a7e91cf57981e89dafb44794dcb9563e8a3fa Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Fri, 5 Oct 2012 11:09:14 +0000 Subject: OCSP stapling: properly check if there is ssl.ctx. This fixes segfault if stapling was enabled in a server without a certificate configured (and hence no ssl.ctx). --- src/http/modules/ngx_http_ssl_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c index 284edd002..62882838d 100644 --- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -737,7 +737,7 @@ ngx_http_ssl_init(ngx_conf_t *cf) sscf = cscfp[s]->ctx->srv_conf[ngx_http_ssl_module.ctx_index]; - if (!sscf->stapling) { + if (sscf->ssl.ctx == NULL || !sscf->stapling) { continue; } -- cgit