|
52 | 52 | #include "SSLSessionTicket.h" |
53 | 53 | #include "iocore/net/YamlSNIConfig.h" |
54 | 54 |
|
55 | | -int SSLConfig::config_index = 0; |
56 | | -int SSLConfig::configids[] = {0, 0}; |
57 | | -int SSLCertificateConfig::configid = 0; |
58 | | -int SSLTicketKeyConfig::configid = 0; |
59 | | -int SSLConfigParams::ssl_maxrecord = 0; |
60 | | -int SSLConfigParams::ssl_misc_max_iobuffer_size_index = 8; |
61 | | -bool SSLConfigParams::ssl_allow_client_renegotiation = false; |
62 | | -bool SSLConfigParams::ssl_ocsp_enabled = false; |
63 | | -int SSLConfigParams::ssl_ocsp_cache_timeout = 3600; |
64 | | -bool SSLConfigParams::ssl_ocsp_request_mode = false; |
65 | | -int SSLConfigParams::ssl_ocsp_request_timeout = 10; |
66 | | -int SSLConfigParams::ssl_ocsp_update_period = 60; |
67 | | -char *SSLConfigParams::ssl_ocsp_user_agent = nullptr; |
68 | | -int SSLConfigParams::ssl_handshake_timeout_in = 0; |
69 | | -int SSLConfigParams::origin_session_cache = 1; |
70 | | -size_t SSLConfigParams::origin_session_cache_size = 10240; |
71 | | -size_t SSLConfigParams::session_cache_number_buckets = 1024; |
72 | | -bool SSLConfigParams::session_cache_skip_on_lock_contention = false; |
73 | | -size_t SSLConfigParams::session_cache_max_bucket_size = 100; |
74 | | -init_ssl_ctx_func SSLConfigParams::init_ssl_ctx_cb = nullptr; |
75 | | -load_ssl_file_func SSLConfigParams::load_ssl_file_cb = nullptr; |
76 | | -swoc::IPRangeSet *SSLConfigParams::proxy_protocol_ip_addrs = nullptr; |
77 | | -bool SSLConfigParams::ssl_ktls_enabled = false; |
| 55 | +int SSLConfig::config_index = 0; |
| 56 | +int SSLConfig::configids[] = {0, 0}; |
| 57 | +int SSLCertificateConfig::configid = 0; |
| 58 | +int SSLTicketKeyConfig::configid = 0; |
| 59 | +int SSLConfigParams::ssl_maxrecord = 0; |
| 60 | +int SSLConfigParams::ssl_misc_max_iobuffer_size_index = 8; |
| 61 | +bool SSLConfigParams::ssl_allow_client_renegotiation = false; |
| 62 | +bool SSLConfigParams::ssl_ocsp_enabled = false; |
| 63 | +int SSLConfigParams::ssl_ocsp_cache_timeout = 3600; |
| 64 | +bool SSLConfigParams::ssl_ocsp_request_mode = false; |
| 65 | +int SSLConfigParams::ssl_ocsp_request_timeout = 10; |
| 66 | +int SSLConfigParams::ssl_ocsp_update_period = 60; |
| 67 | +char *SSLConfigParams::ssl_ocsp_user_agent = nullptr; |
| 68 | +int SSLConfigParams::ssl_handshake_timeout_in = 0; |
| 69 | +int SSLConfigParams::origin_session_cache = 1; |
| 70 | +size_t SSLConfigParams::origin_session_cache_size = 10240; |
| 71 | +init_ssl_ctx_func SSLConfigParams::init_ssl_ctx_cb = nullptr; |
| 72 | +load_ssl_file_func SSLConfigParams::load_ssl_file_cb = nullptr; |
| 73 | +swoc::IPRangeSet *SSLConfigParams::proxy_protocol_ip_addrs = nullptr; |
| 74 | +bool SSLConfigParams::ssl_ktls_enabled = false; |
78 | 75 |
|
79 | 76 | const uint32_t EARLY_DATA_DEFAULT_SIZE = 16384; |
80 | 77 | uint32_t SSLConfigParams::server_max_early_data = 0; |
@@ -122,14 +119,7 @@ SSLConfigParams::reset() |
122 | 119 | verifyServerProperties = YamlSNIConfig::Property::NONE; |
123 | 120 | ssl_ctx_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; |
124 | 121 | ssl_client_ctx_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; |
125 | | - ssl_session_cache = SSL_SESSION_CACHE_MODE_SERVER_ATS_IMPL; |
126 | | - ssl_session_cache_size = 1024 * 100; |
127 | | - ssl_session_cache_num_buckets = 1024; // Sessions per bucket is ceil(ssl_session_cache_size / ssl_session_cache_num_buckets) |
128 | | - ssl_session_cache_skip_on_contention = 0; |
129 | | - ssl_session_cache_timeout = 0; |
130 | | - ssl_session_cache_auto_clear = 1; |
131 | | - configExitOnLoadError = 1; |
132 | | - clientCertExitOnLoadError = 0; |
| 122 | + configExitOnLoadError = 1; |
133 | 123 | } |
134 | 124 |
|
135 | 125 | void |
@@ -442,23 +432,9 @@ SSLConfigParams::initialize() |
442 | 432 | // SSL session cache configurations |
443 | 433 | REC_ReadConfigInteger(ssl_origin_session_cache, "proxy.config.ssl.origin_session_cache.enabled"); |
444 | 434 | REC_ReadConfigInteger(ssl_origin_session_cache_size, "proxy.config.ssl.origin_session_cache.size"); |
445 | | - REC_ReadConfigInteger(ssl_session_cache, "proxy.config.ssl.session_cache.value"); |
446 | | - REC_ReadConfigInteger(ssl_session_cache_size, "proxy.config.ssl.session_cache.size"); |
447 | | - REC_ReadConfigInteger(ssl_session_cache_num_buckets, "proxy.config.ssl.session_cache.num_buckets"); |
448 | | - REC_ReadConfigInteger(ssl_session_cache_skip_on_contention, "proxy.config.ssl.session_cache.skip_cache_on_bucket_contention"); |
449 | | - REC_ReadConfigInteger(ssl_session_cache_timeout, "proxy.config.ssl.session_cache.timeout"); |
450 | | - REC_ReadConfigInteger(ssl_session_cache_auto_clear, "proxy.config.ssl.session_cache.auto_clear"); |
451 | 435 |
|
452 | 436 | SSLConfigParams::origin_session_cache = ssl_origin_session_cache; |
453 | 437 | SSLConfigParams::origin_session_cache_size = ssl_origin_session_cache_size; |
454 | | - SSLConfigParams::session_cache_max_bucket_size = |
455 | | - static_cast<size_t>(ceil(static_cast<double>(ssl_session_cache_size) / ssl_session_cache_num_buckets)); |
456 | | - SSLConfigParams::session_cache_skip_on_lock_contention = ssl_session_cache_skip_on_contention; |
457 | | - SSLConfigParams::session_cache_number_buckets = ssl_session_cache_num_buckets; |
458 | | - |
459 | | - if (ssl_session_cache == SSL_SESSION_CACHE_MODE_SERVER_ATS_IMPL) { |
460 | | - session_cache = new SSLSessionCache(); |
461 | | - } |
462 | 438 |
|
463 | 439 | if (ssl_origin_session_cache == 1 && ssl_origin_session_cache_size > 0) { |
464 | 440 | origin_sess_cache = new SSLOriginSessionCache(); |
|
0 commit comments