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).
This commit is contained in:
Maxim Dounin 2012-10-05 11:09:14 +00:00
parent 82989420ad
commit 0d7a7e91cf

View File

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