comparison src/mail/ngx_mail_handler.c @ 428:9205084bd1f3

Merge with nginx 0.7.14.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 01 Sep 2008 23:28:02 +0400
parents 03a69004d77d a094317ba307
children 9b19e26b2660
comparison
equal deleted inserted replaced
425:3ff402661f4c 428:9205084bd1f3
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 }