diff src/http/modules/ngx_http_ssl_module.c @ 4887:4b4f4cea6dfb

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).
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 05 Oct 2012 11:09:14 +0000
parents e406c997470a
children 9ea42922a395
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssl_module.c	Wed Oct 03 15:25:36 2012 +0000
+++ b/src/http/modules/ngx_http_ssl_module.c	Fri Oct 05 11:09:14 2012 +0000
@@ -737,7 +737,7 @@
 
         sscf = cscfp[s]->ctx->srv_conf[ngx_http_ssl_module.ctx_index];
 
-        if (!sscf->stapling) {
+        if (sscf->ssl.ctx == NULL || !sscf->stapling) {
             continue;
         }