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 #ifndef NET_BASE_SSL_CONFIG_SERVICE_H_ | 5 #ifndef NET_BASE_SSL_CONFIG_SERVICE_H_ |
6 #define NET_BASE_SSL_CONFIG_SERVICE_H_ | 6 #define NET_BASE_SSL_CONFIG_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // certificates, as servers may use the presence of such ciphersuites as a | 78 // certificates, as servers may use the presence of such ciphersuites as a |
79 // hint to send an ECDSA certificate. | 79 // hint to send an ECDSA certificate. |
80 // The ciphers listed in |disabled_cipher_suites| will be removed in addition | 80 // The ciphers listed in |disabled_cipher_suites| will be removed in addition |
81 // to the above list. | 81 // to the above list. |
82 // | 82 // |
83 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in | 83 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in |
84 // big-endian form, they should be declared in host byte order, with the | 84 // big-endian form, they should be declared in host byte order, with the |
85 // first uint8 occupying the most significant byte. | 85 // first uint8 occupying the most significant byte. |
86 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to | 86 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to |
87 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. | 87 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. |
88 // | |
89 // Note: Not implemented when using Schannel/SSLClientSocketWin. | |
90 std::vector<uint16> disabled_cipher_suites; | 88 std::vector<uint16> disabled_cipher_suites; |
91 | 89 |
92 bool cached_info_enabled; // True if TLS cached info extension is enabled. | 90 bool cached_info_enabled; // True if TLS cached info extension is enabled. |
93 bool channel_id_enabled; // True if TLS channel ID extension is enabled. | 91 bool channel_id_enabled; // True if TLS channel ID extension is enabled. |
94 bool false_start_enabled; // True if we'll use TLS False Start. | 92 bool false_start_enabled; // True if we'll use TLS False Start. |
95 | 93 |
96 // TODO(wtc): move the following members to a new SSLParams structure. They | 94 // TODO(wtc): move the following members to a new SSLParams structure. They |
97 // are not SSL configuration settings. | 95 // are not SSL configuration settings. |
98 | 96 |
99 struct NET_EXPORT CertAndStatus { | 97 struct NET_EXPORT CertAndStatus { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 static scoped_refptr<CRLSet> GetCRLSet(); | 170 static scoped_refptr<CRLSet> GetCRLSet(); |
173 | 171 |
174 // Enables the TLS cached info extension, which allows the server to send | 172 // Enables the TLS cached info extension, which allows the server to send |
175 // just a digest of its certificate chain. | 173 // just a digest of its certificate chain. |
176 static void EnableCachedInfo(); | 174 static void EnableCachedInfo(); |
177 static bool cached_info_enabled(); | 175 static bool cached_info_enabled(); |
178 | 176 |
179 // Gets the default minimum protocol version. | 177 // Gets the default minimum protocol version. |
180 static uint16 default_version_min(); | 178 static uint16 default_version_min(); |
181 | 179 |
182 // Sets and gets the default maximum protocol version. | 180 // Gets the default maximum protocol version. |
183 static void SetDefaultVersionMax(uint16 version_max); | |
184 static uint16 default_version_max(); | 181 static uint16 default_version_max(); |
185 | 182 |
186 // Is SNI available in this configuration? | 183 // Is SNI available in this configuration? |
187 static bool IsSNIAvailable(SSLConfigService* service); | 184 static bool IsSNIAvailable(SSLConfigService* service); |
188 | 185 |
189 // Add an observer of this service. | 186 // Add an observer of this service. |
190 void AddObserver(Observer* observer); | 187 void AddObserver(Observer* observer); |
191 | 188 |
192 // Remove an observer of this service. | 189 // Remove an observer of this service. |
193 void RemoveObserver(Observer* observer); | 190 void RemoveObserver(Observer* observer); |
(...skipping 14 matching lines...) Expand all Loading... |
208 void ProcessConfigUpdate(const SSLConfig& orig_config, | 205 void ProcessConfigUpdate(const SSLConfig& orig_config, |
209 const SSLConfig& new_config); | 206 const SSLConfig& new_config); |
210 | 207 |
211 private: | 208 private: |
212 ObserverList<Observer> observer_list_; | 209 ObserverList<Observer> observer_list_; |
213 }; | 210 }; |
214 | 211 |
215 } // namespace net | 212 } // namespace net |
216 | 213 |
217 #endif // NET_BASE_SSL_CONFIG_SERVICE_H_ | 214 #endif // NET_BASE_SSL_CONFIG_SERVICE_H_ |
OLD | NEW |