Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssl_module.c @ 4234:d5462eab1440
Fixed segfault on configuration testing with ssl (ticket #37).
The following config caused segmentation fault due to conf->file not
being properly set if "ssl on" was inherited from the http level:
http {
ssl on;
server {
}
}
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 31 Oct 2011 09:57:14 +0000 |
parents | 7de74ed694c8 |
children | e444e8f6538b |
comparison
equal
deleted
inserted
replaced
4233:aae172db7ac8 | 4234:d5462eab1440 |
---|---|
344 ngx_http_ssl_srv_conf_t *prev = parent; | 344 ngx_http_ssl_srv_conf_t *prev = parent; |
345 ngx_http_ssl_srv_conf_t *conf = child; | 345 ngx_http_ssl_srv_conf_t *conf = child; |
346 | 346 |
347 ngx_pool_cleanup_t *cln; | 347 ngx_pool_cleanup_t *cln; |
348 | 348 |
349 ngx_conf_merge_value(conf->enable, prev->enable, 0); | 349 if (conf->enable == NGX_CONF_UNSET) { |
350 if (prev->enable == NGX_CONF_UNSET) { | |
351 conf->enable = 0; | |
352 | |
353 } else { | |
354 conf->enable = prev->enable; | |
355 conf->file = prev->file; | |
356 conf->line = prev->line; | |
357 } | |
358 } | |
350 | 359 |
351 ngx_conf_merge_value(conf->session_timeout, | 360 ngx_conf_merge_value(conf->session_timeout, |
352 prev->session_timeout, 300); | 361 prev->session_timeout, 300); |
353 | 362 |
354 ngx_conf_merge_value(conf->prefer_server_ciphers, | 363 ngx_conf_merge_value(conf->prefer_server_ciphers, |