| 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/base/ssl_config_service.h" | 5 #include "net/base/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/base/crl_set.h" | 10 #include "net/base/crl_set.h" |
| 11 #include "net/base/ssl_config_service_defaults.h" | 11 #include "net/base/ssl_config_service_defaults.h" |
| 12 #include "net/base/ssl_false_start_blacklist.h" | 12 #include "net/base/ssl_false_start_blacklist.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} | 16 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} |
| 17 | 17 |
| 18 SSLConfig::CertAndStatus::~CertAndStatus() {} | 18 SSLConfig::CertAndStatus::~CertAndStatus() {} |
| 19 | 19 |
| 20 SSLConfig::SSLConfig() | 20 SSLConfig::SSLConfig() |
| 21 : rev_checking_enabled(false), | 21 : rev_checking_enabled(false), |
| 22 ssl3_enabled(true), | 22 ssl3_enabled(true), |
| 23 tls1_enabled(true), | 23 tls1_enabled(true), |
| 24 cached_info_enabled(false), | 24 cached_info_enabled(false), |
| 25 origin_bound_certs_enabled(false), | 25 domain_bound_certs_enabled(false), |
| 26 false_start_enabled(true), | 26 false_start_enabled(true), |
| 27 send_client_cert(false), | 27 send_client_cert(false), |
| 28 verify_ev_cert(false), | 28 verify_ev_cert(false), |
| 29 ssl3_fallback(false), | 29 ssl3_fallback(false), |
| 30 cert_io_enabled(true) { | 30 cert_io_enabled(true) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 SSLConfig::~SSLConfig() { | 33 SSLConfig::~SSLConfig() { |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, | 126 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, |
| 127 const SSLConfig& new_config) { | 127 const SSLConfig& new_config) { |
| 128 bool config_changed = | 128 bool config_changed = |
| 129 (orig_config.rev_checking_enabled != new_config.rev_checking_enabled) || | 129 (orig_config.rev_checking_enabled != new_config.rev_checking_enabled) || |
| 130 (orig_config.ssl3_enabled != new_config.ssl3_enabled) || | 130 (orig_config.ssl3_enabled != new_config.ssl3_enabled) || |
| 131 (orig_config.tls1_enabled != new_config.tls1_enabled) || | 131 (orig_config.tls1_enabled != new_config.tls1_enabled) || |
| 132 (orig_config.disabled_cipher_suites != | 132 (orig_config.disabled_cipher_suites != |
| 133 new_config.disabled_cipher_suites) || | 133 new_config.disabled_cipher_suites) || |
| 134 (orig_config.origin_bound_certs_enabled != | 134 (orig_config.domain_bound_certs_enabled != |
| 135 new_config.origin_bound_certs_enabled) || | 135 new_config.domain_bound_certs_enabled) || |
| 136 (orig_config.false_start_enabled != | 136 (orig_config.false_start_enabled != |
| 137 new_config.false_start_enabled); | 137 new_config.false_start_enabled); |
| 138 | 138 |
| 139 if (config_changed) | 139 if (config_changed) |
| 140 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); | 140 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 // static | 143 // static |
| 144 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { | 144 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { |
| 145 if (!service) | 145 if (!service) |
| 146 return false; | 146 return false; |
| 147 | 147 |
| 148 SSLConfig ssl_config; | 148 SSLConfig ssl_config; |
| 149 service->GetSSLConfig(&ssl_config); | 149 service->GetSSLConfig(&ssl_config); |
| 150 return ssl_config.tls1_enabled; | 150 return ssl_config.tls1_enabled; |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace net | 153 } // namespace net |
| OLD | NEW |