comparison src/stream/ngx_stream_core_module.c @ 7269:7f955d3b9a0d

SSL: detect "listen ... ssl" without certificates (ticket #178). In mail and stream modules, no certificate provided is a fatal condition, much like with the "ssl" and "starttls" directives. In http, "listen ... ssl" can be used in a non-default server without certificates as long as there is a certificate in the default one, so missing certificate is only fatal for default servers.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 24 Apr 2018 15:29:01 +0300
parents ed1101bbf19f
children fe767c99c2ad
comparison
equal deleted inserted replaced
7268:0d8c72ff62dd 7269:7f955d3b9a0d
732 continue; 732 continue;
733 } 733 }
734 734
735 if (ngx_strcmp(value[i].data, "ssl") == 0) { 735 if (ngx_strcmp(value[i].data, "ssl") == 0) {
736 #if (NGX_STREAM_SSL) 736 #if (NGX_STREAM_SSL)
737 ngx_stream_ssl_conf_t *sslcf;
738
739 sslcf = ngx_stream_conf_get_module_srv_conf(cf,
740 ngx_stream_ssl_module);
741
742 sslcf->listen = 1;
743 sslcf->file = cf->conf_file->file.name.data;
744 sslcf->line = cf->conf_file->line;
745
737 ls->ssl = 1; 746 ls->ssl = 1;
747
738 continue; 748 continue;
739 #else 749 #else
740 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 750 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
741 "the \"ssl\" parameter requires " 751 "the \"ssl\" parameter requires "
742 "ngx_stream_ssl_module"); 752 "ngx_stream_ssl_module");