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" | |
13 | 12 |
14 namespace net { | 13 namespace net { |
15 | 14 |
16 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} | 15 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} |
17 | 16 |
18 SSLConfig::CertAndStatus::~CertAndStatus() {} | 17 SSLConfig::CertAndStatus::~CertAndStatus() {} |
19 | 18 |
20 SSLConfig::SSLConfig() | 19 SSLConfig::SSLConfig() |
21 : rev_checking_enabled(false), | 20 : rev_checking_enabled(false), |
22 ssl3_enabled(true), | 21 ssl3_enabled(true), |
(...skipping 27 matching lines...) Expand all Loading... |
50 return true; | 49 return true; |
51 } | 50 } |
52 } | 51 } |
53 return false; | 52 return false; |
54 } | 53 } |
55 | 54 |
56 SSLConfigService::SSLConfigService() | 55 SSLConfigService::SSLConfigService() |
57 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { | 56 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { |
58 } | 57 } |
59 | 58 |
60 // static | |
61 bool SSLConfigService::IsKnownFalseStartIncompatibleServer( | |
62 const std::string& hostname) { | |
63 return SSLFalseStartBlacklist::IsMember(hostname); | |
64 } | |
65 | |
66 static bool g_cached_info_enabled = false; | 59 static bool g_cached_info_enabled = false; |
67 | 60 |
68 // GlobalCRLSet holds a reference to the global CRLSet. It simply wraps a lock | 61 // GlobalCRLSet holds a reference to the global CRLSet. It simply wraps a lock |
69 // around a scoped_refptr so that getting a reference doesn't race with | 62 // around a scoped_refptr so that getting a reference doesn't race with |
70 // updating the CRLSet. | 63 // updating the CRLSet. |
71 class GlobalCRLSet { | 64 class GlobalCRLSet { |
72 public: | 65 public: |
73 void Set(const scoped_refptr<CRLSet>& new_crl_set) { | 66 void Set(const scoped_refptr<CRLSet>& new_crl_set) { |
74 base::AutoLock locked(lock_); | 67 base::AutoLock locked(lock_); |
75 crl_set_ = new_crl_set; | 68 crl_set_ = new_crl_set; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { | 137 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { |
145 if (!service) | 138 if (!service) |
146 return false; | 139 return false; |
147 | 140 |
148 SSLConfig ssl_config; | 141 SSLConfig ssl_config; |
149 service->GetSSLConfig(&ssl_config); | 142 service->GetSSLConfig(&ssl_config); |
150 return ssl_config.tls1_enabled; | 143 return ssl_config.tls1_enabled; |
151 } | 144 } |
152 | 145 |
153 } // namespace net | 146 } // namespace net |
OLD | NEW |