Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssl_module.c @ 3430:966f9cf9c7da stable-0.7
merge r3155, r3156, r3160, r969, r3191, r3197, r3358:
SSL fixes:
*) $ssl_session_id
*) allow "make clean" for OpenSSL, the bug was introduced in r2874
*) disable SSLv2 and use only strong ciphers by default
*) decrease SSL handshake error level to info
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 14:39:16 +0000 |
parents | 08570d26c7c5 |
children |
comparison
equal
deleted
inserted
replaced
3429:9ecd253fcc90 | 3430:966f9cf9c7da |
---|---|
11 | 11 |
12 typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c, | 12 typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c, |
13 ngx_pool_t *pool, ngx_str_t *s); | 13 ngx_pool_t *pool, ngx_str_t *s); |
14 | 14 |
15 | 15 |
16 #define NGX_DEFAULT_CIPHERS "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP" | 16 #define NGX_DEFAULT_CIPHERS "HIGH:!ADH:!MD5" |
17 | 17 |
18 | 18 |
19 static ngx_int_t ngx_http_ssl_static_variable(ngx_http_request_t *r, | 19 static ngx_int_t ngx_http_ssl_static_variable(ngx_http_request_t *r, |
20 ngx_http_variable_value_t *v, uintptr_t data); | 20 ngx_http_variable_value_t *v, uintptr_t data); |
21 static ngx_int_t ngx_http_ssl_variable(ngx_http_request_t *r, | 21 static ngx_int_t ngx_http_ssl_variable(ngx_http_request_t *r, |
182 (uintptr_t) ngx_ssl_get_protocol, NGX_HTTP_VAR_CHANGEABLE, 0 }, | 182 (uintptr_t) ngx_ssl_get_protocol, NGX_HTTP_VAR_CHANGEABLE, 0 }, |
183 | 183 |
184 { ngx_string("ssl_cipher"), NULL, ngx_http_ssl_static_variable, | 184 { ngx_string("ssl_cipher"), NULL, ngx_http_ssl_static_variable, |
185 (uintptr_t) ngx_ssl_get_cipher_name, NGX_HTTP_VAR_CHANGEABLE, 0 }, | 185 (uintptr_t) ngx_ssl_get_cipher_name, NGX_HTTP_VAR_CHANGEABLE, 0 }, |
186 | 186 |
187 { ngx_string("ssl_session_id"), NULL, ngx_http_ssl_variable, | |
188 (uintptr_t) ngx_ssl_get_session_id, NGX_HTTP_VAR_CHANGEABLE, 0 }, | |
189 | |
187 { ngx_string("ssl_client_cert"), NULL, ngx_http_ssl_variable, | 190 { ngx_string("ssl_client_cert"), NULL, ngx_http_ssl_variable, |
188 (uintptr_t) ngx_ssl_get_certificate, NGX_HTTP_VAR_CHANGEABLE, 0 }, | 191 (uintptr_t) ngx_ssl_get_certificate, NGX_HTTP_VAR_CHANGEABLE, 0 }, |
189 | 192 |
190 { ngx_string("ssl_client_raw_cert"), NULL, ngx_http_ssl_variable, | 193 { ngx_string("ssl_client_raw_cert"), NULL, ngx_http_ssl_variable, |
191 (uintptr_t) ngx_ssl_get_raw_certificate, | 194 (uintptr_t) ngx_ssl_get_raw_certificate, |
342 | 345 |
343 ngx_conf_merge_value(conf->prefer_server_ciphers, | 346 ngx_conf_merge_value(conf->prefer_server_ciphers, |
344 prev->prefer_server_ciphers, 0); | 347 prev->prefer_server_ciphers, 0); |
345 | 348 |
346 ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols, | 349 ngx_conf_merge_bitmask_value(conf->protocols, prev->protocols, |
347 (NGX_CONF_BITMASK_SET | 350 (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3|NGX_SSL_TLSv1)); |
348 |NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1)); | |
349 | 351 |
350 ngx_conf_merge_uint_value(conf->verify, prev->verify, 0); | 352 ngx_conf_merge_uint_value(conf->verify, prev->verify, 0); |
351 ngx_conf_merge_uint_value(conf->verify_depth, prev->verify_depth, 1); | 353 ngx_conf_merge_uint_value(conf->verify_depth, prev->verify_depth, 1); |
352 | 354 |
353 ngx_conf_merge_str_value(conf->certificate, prev->certificate, ""); | 355 ngx_conf_merge_str_value(conf->certificate, prev->certificate, ""); |