comparison 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
comparison
equal deleted inserted replaced
2223:005fc65f7ce7 2224:109849282793
116 ngx_mail_ssl_conf_t *sslcf; 116 ngx_mail_ssl_conf_t *sslcf;
117 117
118 sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module); 118 sslcf = ngx_mail_get_module_srv_conf(s, ngx_mail_ssl_module);
119 119
120 if (sslcf->enable) { 120 if (sslcf->enable) {
121 c->log->action = "SSL handshaking";
122
121 ngx_mail_ssl_init_connection(&sslcf->ssl, c); 123 ngx_mail_ssl_init_connection(&sslcf->ssl, c);
122 return; 124 return;
123 } 125 }
126
127 if (imia[i].ssl) {
128
129 c->log->action = "SSL handshaking";
130
131 if (sslcf->ssl.ctx == NULL) {
132 ngx_log_error(NGX_LOG_ERR, c->log, 0,
133 "no \"ssl_certificate\" is defined "
134 "in server listening on SSL port");
135 ngx_mail_close_connection(c);
136 return;
137 }
138
139 ngx_mail_ssl_init_connection(&sslcf->ssl, c);
140 return;
141 }
142
124 } 143 }
125 #endif 144 #endif
126 145
127 ngx_mail_init_session(c); 146 ngx_mail_init_session(c);
128 } 147 }