diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-09-01 14:19:01 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-09-01 14:19:01 +0000 |
commit | f100c7816dd910907597f716bf561f3361f88e1a (patch) | |
tree | c11cc9167bc57ab241789c2956811854c4f33ac6 /src/mail/ngx_mail_handler.c | |
parent | 0c16f73b4e376439a3fb6ae71e45b997cba9e971 (diff) | |
download | nginx-f100c7816dd910907597f716bf561f3361f88e1a.tar.gz nginx-f100c7816dd910907597f716bf561f3361f88e1a.zip |
*) listen ssl
*) no default ssl_cetificate and ssl_cetificate_key
Diffstat (limited to 'src/mail/ngx_mail_handler.c')
-rw-r--r-- | src/mail/ngx_mail_handler.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index 4cc5e3e62..6915dc94f 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -118,9 +118,28 @@ ngx_mail_init_connection(ngx_connection_t *c) 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 |