Mercurial > hg > nginx
diff src/mail/ngx_mail_handler.c @ 2224:109849282793
*) listen ssl
*) no default ssl_cetificate and ssl_cetificate_key
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Sep 2008 14:19:01 +0000 |
parents | cbf6f2eb57ad |
children | 722b5aff05ae |
line wrap: on
line diff
--- a/src/mail/ngx_mail_handler.c Mon Sep 01 14:05:20 2008 +0000 +++ b/src/mail/ngx_mail_handler.c Mon Sep 01 14:19:01 2008 +0000 @@ -118,9 +118,28 @@ sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module); if (sslcf->enable) { + c->log->action = "SSL handshaking"; + ngx_mail_ssl_init_connection(&sslcf->ssl, c); return; } + + if (imia[i].ssl) { + + c->log->action = "SSL handshaking"; + + if (sslcf->ssl.ctx == NULL) { + ngx_log_error(NGX_LOG_ERR, c->log, 0, + "no \"ssl_certificate\" is defined " + "in server listening on SSL port"); + ngx_mail_close_connection(c); + return; + } + + ngx_mail_ssl_init_connection(&sslcf->ssl, c); + return; + } + } #endif