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

Side by Side Diff: net/ssl/ssl_config.h

Issue 2382983002: Remove the last of the TLS fallback code. (Closed)
Patch Set: mmenke comments Created 4 years, 2 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
« no previous file with comments | « net/ssl/openssl_ssl_util.cc ('k') | net/ssl/ssl_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SSL_SSL_CONFIG_H_ 5 #ifndef NET_SSL_SSL_CONFIG_H_
6 #define NET_SSL_SSL_CONFIG_H_ 6 #define NET_SSL_SSL_CONFIG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 23 matching lines...) Expand all
34 TB_PARAM_RSA2048_PSS = 1, 34 TB_PARAM_RSA2048_PSS = 1,
35 TB_PARAM_ECDSAP256 = 2, 35 TB_PARAM_ECDSAP256 = 2,
36 }; 36 };
37 37
38 // Default minimum protocol version. 38 // Default minimum protocol version.
39 NET_EXPORT extern const uint16_t kDefaultSSLVersionMin; 39 NET_EXPORT extern const uint16_t kDefaultSSLVersionMin;
40 40
41 // Default maximum protocol version. 41 // Default maximum protocol version.
42 NET_EXPORT extern const uint16_t kDefaultSSLVersionMax; 42 NET_EXPORT extern const uint16_t kDefaultSSLVersionMax;
43 43
44 // Default minimum protocol version that it's acceptable to fallback to.
45 NET_EXPORT extern const uint16_t kDefaultSSLVersionFallbackMin;
46
47 // A collection of SSL-related configuration settings. 44 // A collection of SSL-related configuration settings.
48 struct NET_EXPORT SSLConfig { 45 struct NET_EXPORT SSLConfig {
49 // Default to revocation checking. 46 // Default to revocation checking.
50 SSLConfig(); 47 SSLConfig();
51 SSLConfig(const SSLConfig& other); 48 SSLConfig(const SSLConfig& other);
52 ~SSLConfig(); 49 ~SSLConfig();
53 50
54 // Returns true if |cert| is one of the certs in |allowed_bad_certs|. 51 // Returns true if |cert| is one of the certs in |allowed_bad_certs|.
55 // The expected cert status is written to |cert_status|. |*cert_status| can 52 // The expected cert status is written to |cert_status|. |*cert_status| can
56 // be NULL if user doesn't care about the cert status. 53 // be NULL if user doesn't care about the cert status.
(...skipping 24 matching lines...) Expand all
81 // local (non-public) trust anchor should be allowed. 78 // local (non-public) trust anchor should be allowed.
82 bool sha1_local_anchors_enabled; 79 bool sha1_local_anchors_enabled;
83 80
84 // The minimum and maximum protocol versions that are enabled. 81 // The minimum and maximum protocol versions that are enabled.
85 // (Use the SSL_PROTOCOL_VERSION_xxx enumerators defined above.) 82 // (Use the SSL_PROTOCOL_VERSION_xxx enumerators defined above.)
86 // SSL 2.0 and SSL 3.0 are not supported. If version_max < version_min, it 83 // SSL 2.0 and SSL 3.0 are not supported. If version_max < version_min, it
87 // means no protocol versions are enabled. 84 // means no protocol versions are enabled.
88 uint16_t version_min; 85 uint16_t version_min;
89 uint16_t version_max; 86 uint16_t version_max;
90 87
91 // version_fallback_min contains the minimum version that is acceptable to
92 // fallback to. Versions before this may be tried to see whether they would
93 // have succeeded and thus to give a better message to the user, but the
94 // resulting connection won't be used in these cases.
95 uint16_t version_fallback_min;
96
97 // Presorted list of cipher suites which should be explicitly prevented from 88 // Presorted list of cipher suites which should be explicitly prevented from
98 // being used in addition to those disabled by the net built-in policy. 89 // being used in addition to those disabled by the net built-in policy.
99 // 90 //
100 // Though cipher suites are sent in TLS as "uint8_t CipherSuite[2]", in 91 // Though cipher suites are sent in TLS as "uint8_t CipherSuite[2]", in
101 // big-endian form, they should be declared in host byte order, with the 92 // big-endian form, they should be declared in host byte order, with the
102 // first uint8_t occupying the most significant byte. 93 // first uint8_t occupying the most significant byte.
103 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to 94 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to
104 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. 95 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002.
105 std::vector<uint16_t> disabled_cipher_suites; 96 std::vector<uint16_t> disabled_cipher_suites;
106 97
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // |allowed_bad_certs| that should not trigger an ERR_CERT_* error when 139 // |allowed_bad_certs| that should not trigger an ERR_CERT_* error when
149 // calling SSLClientSocket::Connect. This would normally be done in 140 // calling SSLClientSocket::Connect. This would normally be done in
150 // response to the user explicitly accepting the bad certificate. 141 // response to the user explicitly accepting the bad certificate.
151 std::vector<CertAndStatus> allowed_bad_certs; 142 std::vector<CertAndStatus> allowed_bad_certs;
152 143
153 // True if we should send client_cert to the server. 144 // True if we should send client_cert to the server.
154 bool send_client_cert; 145 bool send_client_cert;
155 146
156 bool verify_ev_cert; // True if we should verify the certificate for EV. 147 bool verify_ev_cert; // True if we should verify the certificate for EV.
157 148
158 bool version_fallback; // True if we are falling back to an older protocol
159 // version (one still needs to decrement
160 // version_max).
161
162 // If cert_io_enabled is false, then certificate verification will not 149 // If cert_io_enabled is false, then certificate verification will not
163 // result in additional HTTP requests. (For example: to fetch missing 150 // result in additional HTTP requests. (For example: to fetch missing
164 // intermediates or to perform OCSP/CRL fetches.) It also implies that online 151 // intermediates or to perform OCSP/CRL fetches.) It also implies that online
165 // revocation checking is disabled. 152 // revocation checking is disabled.
166 // NOTE: Only used by NSS. 153 // NOTE: Only used by NSS.
167 bool cert_io_enabled; 154 bool cert_io_enabled;
168 155
169 // The list of application level protocols supported with ALPN (Application 156 // The list of application level protocols supported with ALPN (Application
170 // Layer Protocol Negotation), in decreasing order of preference. Protocols 157 // Layer Protocol Negotation), in decreasing order of preference. Protocols
171 // will be advertised in this order during TLS handshake. 158 // will be advertised in this order during TLS handshake.
172 NextProtoVector alpn_protos; 159 NextProtoVector alpn_protos;
173 160
174 // True if renegotiation should be allowed for the default application-level 161 // True if renegotiation should be allowed for the default application-level
175 // protocol when the peer negotiates neither ALPN nor NPN. 162 // protocol when the peer negotiates neither ALPN nor NPN.
176 bool renego_allowed_default; 163 bool renego_allowed_default;
177 164
178 // The list of application-level protocols to enable renegotiation for. 165 // The list of application-level protocols to enable renegotiation for.
179 NextProtoVector renego_allowed_for_protos; 166 NextProtoVector renego_allowed_for_protos;
180 167
181 scoped_refptr<X509Certificate> client_cert; 168 scoped_refptr<X509Certificate> client_cert;
182 scoped_refptr<SSLPrivateKey> client_private_key; 169 scoped_refptr<SSLPrivateKey> client_private_key;
183 }; 170 };
184 171
185 } // namespace net 172 } // namespace net
186 173
187 #endif // NET_SSL_SSL_CONFIG_H_ 174 #endif // NET_SSL_SSL_CONFIG_H_
OLDNEW
« no previous file with comments | « net/ssl/openssl_ssl_util.cc ('k') | net/ssl/ssl_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698