Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: net/base/ssl_config_service.h

Issue 6792032: net: remove forced renegotiation checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // 49 //
50 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in 50 // Though cipher suites are sent in TLS as "uint8 CipherSuite[2]", in
51 // big-endian form, they should be declared in host byte order, with the 51 // big-endian form, they should be declared in host byte order, with the
52 // first uint8 occupying the most significant byte. 52 // first uint8 occupying the most significant byte.
53 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to 53 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to
54 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. 54 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002.
55 // 55 //
56 // TODO(rsleevi): Not implemented when using Schannel. 56 // TODO(rsleevi): Not implemented when using Schannel.
57 std::vector<uint16> disabled_cipher_suites; 57 std::vector<uint16> disabled_cipher_suites;
58 58
59 // True if we allow this connection to be MITM attacked. This sounds a little
60 // worse than it is: large networks sometimes MITM attack all SSL connections
61 // on egress. We want to know this because we might not have the end-to-end
62 // connection that we believe that we have based on the hostname. Therefore,
63 // certain certificate checks can't be performed and we can't use outside
64 // knowledge about whether the server has the renegotiation extension.
65 bool mitm_proxies_allowed;
66
67 bool false_start_enabled; // True if we'll use TLS False Start. 59 bool false_start_enabled; // True if we'll use TLS False Start.
68 60
69 // TODO(wtc): move the following members to a new SSLParams structure. They 61 // TODO(wtc): move the following members to a new SSLParams structure. They
70 // are not SSL configuration settings. 62 // are not SSL configuration settings.
71 63
72 struct CertAndStatus { 64 struct CertAndStatus {
73 CertAndStatus(); 65 CertAndStatus();
74 ~CertAndStatus(); 66 ~CertAndStatus();
75 67
76 scoped_refptr<X509Certificate> cert; 68 scoped_refptr<X509Certificate> cert;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Create an instance of SSLConfigService which retrieves the configuration 120 // Create an instance of SSLConfigService which retrieves the configuration
129 // from the system SSL configuration, or an instance of 121 // from the system SSL configuration, or an instance of
130 // SSLConfigServiceDefaults if the current system does not have a system SSL 122 // SSLConfigServiceDefaults if the current system does not have a system SSL
131 // configuration. Note: this does not handle SSLConfigService implementations 123 // configuration. Note: this does not handle SSLConfigService implementations
132 // that are not native to their platform, such as preference-backed ones. 124 // that are not native to their platform, such as preference-backed ones.
133 static SSLConfigService* CreateSystemSSLConfigService(); 125 static SSLConfigService* CreateSystemSSLConfigService();
134 126
135 // May not be thread-safe, should only be called on the IO thread. 127 // May not be thread-safe, should only be called on the IO thread.
136 virtual void GetSSLConfig(SSLConfig* config) = 0; 128 virtual void GetSSLConfig(SSLConfig* config) = 0;
137 129
138 // Returns true if the given hostname is known to be 'strict'. This means
139 // that we will require the renegotiation extension and will always use TLS
140 // (no SSLv3 fallback).
141 //
142 // If you wish to add an element to this list, file a bug at
143 // http://crbug.com and email the link to agl AT chromium DOT org.
144 static bool IsKnownStrictTLSServer(const std::string& hostname);
145
146 // Returns true if the given hostname is known to be incompatible with TLS 130 // Returns true if the given hostname is known to be incompatible with TLS
147 // False Start. 131 // False Start.
148 static bool IsKnownFalseStartIncompatibleServer(const std::string& hostname); 132 static bool IsKnownFalseStartIncompatibleServer(const std::string& hostname);
149 133
150 // Enables the acceptance of self-signed certificates which contain an 134 // Enables the acceptance of self-signed certificates which contain an
151 // embedded DNSSEC chain proving their validity. 135 // embedded DNSSEC chain proving their validity.
152 static void EnableDNSSEC(); 136 static void EnableDNSSEC();
153 static bool dnssec_enabled(); 137 static bool dnssec_enabled();
154 138
155 // Enables Snap Start, an experiemental SSL/TLS extension for zero round 139 // Enables Snap Start, an experiemental SSL/TLS extension for zero round
156 // trip handshakes. 140 // trip handshakes.
157 static void EnableSnapStart(); 141 static void EnableSnapStart();
158 static bool snap_start_enabled(); 142 static bool snap_start_enabled();
159 143
160 // Sets a global flag which allows SSL connections to be MITM attacked. See
161 // the comment about this flag in |SSLConfig|.
162 static void AllowMITMProxies();
163 static bool mitm_proxies_allowed();
164
165 // Disables False Start in SSL connections. 144 // Disables False Start in SSL connections.
166 static void DisableFalseStart(); 145 static void DisableFalseStart();
167 // True if we use False Start for SSL and TLS. 146 // True if we use False Start for SSL and TLS.
168 static bool false_start_enabled(); 147 static bool false_start_enabled();
169 148
170 // Enables DNS side checks for certificates. 149 // Enables DNS side checks for certificates.
171 static void EnableDNSCertProvenanceChecking(); 150 static void EnableDNSCertProvenanceChecking();
172 static bool dns_cert_provenance_checking_enabled(); 151 static bool dns_cert_provenance_checking_enabled();
173 152
174 // Add an observer of this service. 153 // Add an observer of this service.
(...skipping 14 matching lines...) Expand all
189 void ProcessConfigUpdate(const SSLConfig& orig_config, 168 void ProcessConfigUpdate(const SSLConfig& orig_config,
190 const SSLConfig& new_config); 169 const SSLConfig& new_config);
191 170
192 private: 171 private:
193 ObserverList<Observer> observer_list_; 172 ObserverList<Observer> observer_list_;
194 }; 173 };
195 174
196 } // namespace net 175 } // namespace net
197 176
198 #endif // NET_BASE_SSL_CONFIG_SERVICE_H_ 177 #endif // NET_BASE_SSL_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698