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
+++ 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;
         }