Mercurial > hg > nginx-quic
comparison src/mail/ngx_mail_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 | 6c13008ad503 |
children | 4f9b72a229c1 |
comparison
equal
deleted
inserted
replaced
7268:0d8c72ff62dd | 7269:7f955d3b9a0d |
---|---|
472 #endif | 472 #endif |
473 } | 473 } |
474 | 474 |
475 if (ngx_strcmp(value[i].data, "ssl") == 0) { | 475 if (ngx_strcmp(value[i].data, "ssl") == 0) { |
476 #if (NGX_MAIL_SSL) | 476 #if (NGX_MAIL_SSL) |
477 ngx_mail_ssl_conf_t *sslcf; | |
478 | |
479 sslcf = ngx_mail_conf_get_module_srv_conf(cf, ngx_mail_ssl_module); | |
480 | |
481 sslcf->listen = 1; | |
482 sslcf->file = cf->conf_file->file.name.data; | |
483 sslcf->line = cf->conf_file->line; | |
484 | |
477 ls->ssl = 1; | 485 ls->ssl = 1; |
486 | |
478 continue; | 487 continue; |
479 #else | 488 #else |
480 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 489 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
481 "the \"ssl\" parameter requires " | 490 "the \"ssl\" parameter requires " |
482 "ngx_mail_ssl_module"); | 491 "ngx_mail_ssl_module"); |