Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/ssl/ssl_config_service.h" | 5 #include "net/ssl/ssl_config_service.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "net/cert/crl_set.h" | 10 #include "net/cert/crl_set.h" |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 SSLConfig::CertAndStatus::~CertAndStatus() {} | 36 SSLConfig::CertAndStatus::~CertAndStatus() {} |
| 37 | 37 |
| 38 SSLConfig::SSLConfig() | 38 SSLConfig::SSLConfig() |
| 39 : rev_checking_enabled(false), | 39 : rev_checking_enabled(false), |
| 40 rev_checking_required_local_anchors(false), | 40 rev_checking_required_local_anchors(false), |
| 41 version_min(g_default_version_min), | 41 version_min(g_default_version_min), |
| 42 version_max(g_default_version_max), | 42 version_max(g_default_version_max), |
| 43 cached_info_enabled(false), | 43 cached_info_enabled(false), |
| 44 channel_id_enabled(true), | 44 channel_id_enabled(true), |
| 45 false_start_enabled(true), | 45 false_start_enabled(true), |
| 46 signed_cert_timestamps_enabled(false), | |
| 46 require_forward_secrecy(false), | 47 require_forward_secrecy(false), |
| 47 unrestricted_ssl3_fallback_enabled(false), | 48 unrestricted_ssl3_fallback_enabled(false), |
| 48 send_client_cert(false), | 49 send_client_cert(false), |
| 49 verify_ev_cert(false), | 50 verify_ev_cert(false), |
| 50 version_fallback(false), | 51 version_fallback(false), |
| 51 cert_io_enabled(true) { | 52 cert_io_enabled(true) { |
| 52 } | 53 } |
| 53 | 54 |
| 54 SSLConfig::~SSLConfig() { | 55 SSLConfig::~SSLConfig() { |
| 55 } | 56 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 const SSLConfig& new_config) { | 157 const SSLConfig& new_config) { |
| 157 bool config_changed = | 158 bool config_changed = |
| 158 (orig_config.rev_checking_enabled != new_config.rev_checking_enabled) || | 159 (orig_config.rev_checking_enabled != new_config.rev_checking_enabled) || |
| 159 (orig_config.rev_checking_required_local_anchors != | 160 (orig_config.rev_checking_required_local_anchors != |
| 160 new_config.rev_checking_required_local_anchors) || | 161 new_config.rev_checking_required_local_anchors) || |
| 161 (orig_config.version_min != new_config.version_min) || | 162 (orig_config.version_min != new_config.version_min) || |
| 162 (orig_config.version_max != new_config.version_max) || | 163 (orig_config.version_max != new_config.version_max) || |
| 163 (orig_config.disabled_cipher_suites != | 164 (orig_config.disabled_cipher_suites != |
| 164 new_config.disabled_cipher_suites) || | 165 new_config.disabled_cipher_suites) || |
| 165 (orig_config.channel_id_enabled != new_config.channel_id_enabled) || | 166 (orig_config.channel_id_enabled != new_config.channel_id_enabled) || |
| 166 (orig_config.false_start_enabled != new_config.false_start_enabled) || | 167 (orig_config.false_start_enabled != new_config.false_start_enabled) || |
|
wtc
2013/11/26 17:32:55
Please add a check for signed_cert_timestamps_enab
ekasper
2013/11/26 19:33:54
Done, and added to the test.
| |
| 167 (orig_config.require_forward_secrecy != | 168 (orig_config.require_forward_secrecy != |
| 168 new_config.require_forward_secrecy) || | 169 new_config.require_forward_secrecy) || |
| 169 (orig_config.unrestricted_ssl3_fallback_enabled != | 170 (orig_config.unrestricted_ssl3_fallback_enabled != |
| 170 new_config.unrestricted_ssl3_fallback_enabled); | 171 new_config.unrestricted_ssl3_fallback_enabled); |
| 171 | 172 |
| 172 if (config_changed) | 173 if (config_changed) |
| 173 NotifySSLConfigChange(); | 174 NotifySSLConfigChange(); |
| 174 } | 175 } |
| 175 | 176 |
| 176 // static | 177 // static |
| 177 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { | 178 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { |
| 178 if (!service) | 179 if (!service) |
| 179 return false; | 180 return false; |
| 180 | 181 |
| 181 SSLConfig ssl_config; | 182 SSLConfig ssl_config; |
| 182 service->GetSSLConfig(&ssl_config); | 183 service->GetSSLConfig(&ssl_config); |
| 183 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1; | 184 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1; |
| 184 } | 185 } |
| 185 | 186 |
| 186 } // namespace net | 187 } // namespace net |
| OLD | NEW |