OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/base/ssl_config_service_defaults.h" | 7 #include "net/base/ssl_config_service_defaults.h" |
8 #include "net/base/ssl_false_start_blacklist.h" | 8 #include "net/base/ssl_false_start_blacklist.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 // static | 43 // static |
44 bool SSLConfigService::IsKnownFalseStartIncompatibleServer( | 44 bool SSLConfigService::IsKnownFalseStartIncompatibleServer( |
45 const std::string& hostname) { | 45 const std::string& hostname) { |
46 return SSLFalseStartBlacklist::IsMember(hostname.c_str()); | 46 return SSLFalseStartBlacklist::IsMember(hostname.c_str()); |
47 } | 47 } |
48 | 48 |
49 static bool g_false_start_enabled = true; | 49 static bool g_false_start_enabled = true; |
50 static bool g_dns_cert_provenance_checking = false; | 50 static bool g_dns_cert_provenance_checking = false; |
| 51 static bool g_rev_checking_disabled_for_pinned_sites = false; |
51 | 52 |
52 // static | 53 // static |
53 void SSLConfigService::DisableFalseStart() { | 54 void SSLConfigService::DisableFalseStart() { |
54 g_false_start_enabled = false; | 55 g_false_start_enabled = false; |
55 } | 56 } |
56 | 57 |
57 // static | 58 // static |
58 bool SSLConfigService::false_start_enabled() { | 59 bool SSLConfigService::false_start_enabled() { |
59 return g_false_start_enabled; | 60 return g_false_start_enabled; |
60 } | 61 } |
61 | 62 |
62 // static | 63 // static |
63 void SSLConfigService::EnableDNSCertProvenanceChecking() { | 64 void SSLConfigService::EnableDNSCertProvenanceChecking() { |
64 g_dns_cert_provenance_checking = true; | 65 g_dns_cert_provenance_checking = true; |
65 } | 66 } |
66 | 67 |
67 // static | 68 // static |
68 bool SSLConfigService::dns_cert_provenance_checking_enabled() { | 69 bool SSLConfigService::dns_cert_provenance_checking_enabled() { |
69 return g_dns_cert_provenance_checking; | 70 return g_dns_cert_provenance_checking; |
70 } | 71 } |
71 | 72 |
| 73 // static |
| 74 void SSLConfigService::DisableRevCheckingForPinnedSites() { |
| 75 g_rev_checking_disabled_for_pinned_sites = true; |
| 76 } |
| 77 |
| 78 // static |
| 79 bool SSLConfigService::rev_checking_disabled_for_pinned_sites() { |
| 80 return g_rev_checking_disabled_for_pinned_sites; |
| 81 } |
| 82 |
72 void SSLConfigService::AddObserver(Observer* observer) { | 83 void SSLConfigService::AddObserver(Observer* observer) { |
73 observer_list_.AddObserver(observer); | 84 observer_list_.AddObserver(observer); |
74 } | 85 } |
75 | 86 |
76 void SSLConfigService::RemoveObserver(Observer* observer) { | 87 void SSLConfigService::RemoveObserver(Observer* observer) { |
77 observer_list_.RemoveObserver(observer); | 88 observer_list_.RemoveObserver(observer); |
78 } | 89 } |
79 | 90 |
80 SSLConfigService::~SSLConfigService() { | 91 SSLConfigService::~SSLConfigService() { |
81 } | 92 } |
(...skipping 18 matching lines...) Expand all Loading... |
100 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { | 111 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { |
101 if (!service) | 112 if (!service) |
102 return false; | 113 return false; |
103 | 114 |
104 SSLConfig ssl_config; | 115 SSLConfig ssl_config; |
105 service->GetSSLConfig(&ssl_config); | 116 service->GetSSLConfig(&ssl_config); |
106 return ssl_config.tls1_enabled; | 117 return ssl_config.tls1_enabled; |
107 } | 118 } |
108 | 119 |
109 } // namespace net | 120 } // namespace net |
OLD | NEW |