comparison src/mail/ngx_mail_ssl_module.c @ 380:bc21d9cd9c54 NGINX_0_7_2

nginx 0.7.2 *) Feature: now nginx supports EDH key exchange ciphers. *) Feature: the "ssl_dhparam" directive. *) Feature: the $ssl_client_cert variable. Thanks to Manlio Perillo. *) Bugfix: after changing URI via a "rewrite" directive nginx did not search a new location; bug appeared in 0.7.1. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built without PCRE library; bug appeared in 0.7.1. *) Bugfix: when a request to a directory was redirected with the slash added, nginx dropped a query string from the original request.
author Igor Sysoev <http://sysoev.ru>
date Mon, 16 Jun 2008 00:00:00 +0400
parents 820f6378fc00
children 0b6053502c55
comparison
equal deleted inserted replaced
379:9d9dad60269f 380:bc21d9cd9c54
72 { ngx_string("ssl_certificate_key"), 72 { ngx_string("ssl_certificate_key"),
73 NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1, 73 NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
74 ngx_conf_set_str_slot, 74 ngx_conf_set_str_slot,
75 NGX_MAIL_SRV_CONF_OFFSET, 75 NGX_MAIL_SRV_CONF_OFFSET,
76 offsetof(ngx_mail_ssl_conf_t, certificate_key), 76 offsetof(ngx_mail_ssl_conf_t, certificate_key),
77 NULL },
78
79 { ngx_string("ssl_dhparam"),
80 NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
81 ngx_conf_set_str_slot,
82 NGX_MAIL_SRV_CONF_OFFSET,
83 offsetof(ngx_mail_ssl_conf_t, dhparam),
77 NULL }, 84 NULL },
78 85
79 { ngx_string("ssl_protocols"), 86 { ngx_string("ssl_protocols"),
80 NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_1MORE, 87 NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_1MORE,
81 ngx_conf_set_bitmask_slot, 88 ngx_conf_set_bitmask_slot,
161 168
162 /* 169 /*
163 * set by ngx_pcalloc(): 170 * set by ngx_pcalloc():
164 * 171 *
165 * scf->protocols = 0; 172 * scf->protocols = 0;
166 * scf->certificate.len = 0; 173 * scf->certificate = { 0, NULL };
167 * scf->certificate.data = NULL; 174 * scf->certificate_key = { 0, NULL };
168 * scf->certificate_key.len = 0; 175 * scf->dhparam = { 0, NULL };
169 * scf->certificate_key.data = NULL;
170 * scf->ciphers.len = 0; 176 * scf->ciphers.len = 0;
171 * scf->ciphers.data = NULL; 177 * scf->ciphers.data = NULL;
172 * scf->shm_zone = NULL; 178 * scf->shm_zone = NULL;
173 */ 179 */
174 180
210 ngx_conf_merge_str_value(conf->certificate, prev->certificate, 216 ngx_conf_merge_str_value(conf->certificate, prev->certificate,
211 NGX_DEFLAUT_CERTIFICATE); 217 NGX_DEFLAUT_CERTIFICATE);
212 218
213 ngx_conf_merge_str_value(conf->certificate_key, prev->certificate_key, 219 ngx_conf_merge_str_value(conf->certificate_key, prev->certificate_key,
214 NGX_DEFLAUT_CERTIFICATE_KEY); 220 NGX_DEFLAUT_CERTIFICATE_KEY);
221
222 ngx_conf_merge_str_value(conf->dhparam, prev->dhparam, "");
215 223
216 ngx_conf_merge_str_value(conf->ciphers, prev->ciphers, NGX_DEFLAUT_CIPHERS); 224 ngx_conf_merge_str_value(conf->ciphers, prev->ciphers, NGX_DEFLAUT_CIPHERS);
217 225
218 226
219 conf->ssl.log = cf->log; 227 conf->ssl.log = cf->log;
258 266
259 if (ngx_ssl_generate_rsa512_key(&conf->ssl) != NGX_OK) { 267 if (ngx_ssl_generate_rsa512_key(&conf->ssl) != NGX_OK) {
260 return NGX_CONF_ERROR; 268 return NGX_CONF_ERROR;
261 } 269 }
262 270
271 if (ngx_ssl_dhparam(cf, &conf->ssl, &conf->dhparam) != NGX_OK) {
272 return NGX_CONF_ERROR;
273 }
274
263 ngx_conf_merge_value(conf->builtin_session_cache, 275 ngx_conf_merge_value(conf->builtin_session_cache,
264 prev->builtin_session_cache, NGX_SSL_NONE_SCACHE); 276 prev->builtin_session_cache, NGX_SSL_NONE_SCACHE);
265 277
266 if (conf->shm_zone == NULL) { 278 if (conf->shm_zone == NULL) {
267 conf->shm_zone = prev->shm_zone; 279 conf->shm_zone = prev->shm_zone;