Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
4886:b7f6f097d95e | 4887:4b4f4cea6dfb |
---|---|
735 | 735 |
736 for (s = 0; s < cmcf->servers.nelts; s++) { | 736 for (s = 0; s < cmcf->servers.nelts; s++) { |
737 | 737 |
738 sscf = cscfp[s]->ctx->srv_conf[ngx_http_ssl_module.ctx_index]; | 738 sscf = cscfp[s]->ctx->srv_conf[ngx_http_ssl_module.ctx_index]; |
739 | 739 |
740 if (!sscf->stapling) { | 740 if (sscf->ssl.ctx == NULL || !sscf->stapling) { |
741 continue; | 741 continue; |
742 } | 742 } |
743 | 743 |
744 clcf = cscfp[s]->ctx->loc_conf[ngx_http_core_module.ctx_index]; | 744 clcf = cscfp[s]->ctx->loc_conf[ngx_http_core_module.ctx_index]; |
745 | 745 |