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

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

Issue 1360633002: Implement Token Binding negotiation TLS extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-server-flags
Patch Set: rebase Created 5 years, 3 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
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 #include "net/cert/x509_certificate.h" 11 #include "net/cert/x509_certificate.h"
12 #include "net/socket/next_proto.h" 12 #include "net/socket/next_proto.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 // Various TLS/SSL ProtocolVersion values encoded as uint16 16 // Various TLS/SSL ProtocolVersion values encoded as uint16
17 // struct { 17 // struct {
18 // uint8 major; 18 // uint8 major;
19 // uint8 minor; 19 // uint8 minor;
20 // } ProtocolVersion; 20 // } ProtocolVersion;
21 // The most significant byte is |major|, and the least significant byte 21 // The most significant byte is |major|, and the least significant byte
22 // is |minor|. 22 // is |minor|.
23 enum { 23 enum {
24 SSL_PROTOCOL_VERSION_TLS1 = 0x0301, 24 SSL_PROTOCOL_VERSION_TLS1 = 0x0301,
25 SSL_PROTOCOL_VERSION_TLS1_1 = 0x0302, 25 SSL_PROTOCOL_VERSION_TLS1_1 = 0x0302,
26 SSL_PROTOCOL_VERSION_TLS1_2 = 0x0303, 26 SSL_PROTOCOL_VERSION_TLS1_2 = 0x0303,
27 }; 27 };
28 28
29 enum TokenBindingParam {
30 TB_PARAM_RSA2048_PKCS15_SHA256 = 0,
31 TB_PARAM_RSA2048_PSS_SHA256 = 1,
32 TB_PARAM_ECDSAP256_SHA256 = 2,
33 };
34
29 // Default minimum protocol version. 35 // Default minimum protocol version.
30 NET_EXPORT extern const uint16 kDefaultSSLVersionMin; 36 NET_EXPORT extern const uint16 kDefaultSSLVersionMin;
31 37
32 // For maximum supported protocol version, use 38 // For maximum supported protocol version, use
33 // SSLClientSocket::GetMaxSupportedSSLVersion(). 39 // SSLClientSocket::GetMaxSupportedSSLVersion().
34 40
35 // Default minimum protocol version that it's acceptable to fallback to. 41 // Default minimum protocol version that it's acceptable to fallback to.
36 NET_EXPORT extern const uint16 kDefaultSSLVersionFallbackMin; 42 NET_EXPORT extern const uint16 kDefaultSSLVersionFallbackMin;
37 43
38 // A collection of SSL-related configuration settings. 44 // A collection of SSL-related configuration settings.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // big-endian form, they should be declared in host byte order, with the 111 // big-endian form, they should be declared in host byte order, with the
106 // first uint8 occupying the most significant byte. 112 // first uint8 occupying the most significant byte.
107 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to 113 // Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify 0x0004, while to
108 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. 114 // disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002.
109 std::vector<uint16> disabled_cipher_suites; 115 std::vector<uint16> disabled_cipher_suites;
110 116
111 // Enables deprecated cipher suites. Currently, RC4 is deprecated. 117 // Enables deprecated cipher suites. Currently, RC4 is deprecated.
112 bool enable_deprecated_cipher_suites; 118 bool enable_deprecated_cipher_suites;
113 119
114 bool channel_id_enabled; // True if TLS channel ID extension is enabled. 120 bool channel_id_enabled; // True if TLS channel ID extension is enabled.
121
122 // List of Token Binding key parameters supported by the client. If empty,
123 // Token Binding will be disabled.
124 std::vector<TokenBindingParam> token_binding_params;
125
115 bool false_start_enabled; // True if we'll use TLS False Start. 126 bool false_start_enabled; // True if we'll use TLS False Start.
116 // True if the Certificate Transparency signed_certificate_timestamp 127 // True if the Certificate Transparency signed_certificate_timestamp
117 // TLS extension is enabled. 128 // TLS extension is enabled.
118 bool signed_cert_timestamps_enabled; 129 bool signed_cert_timestamps_enabled;
119 130
120 // If true, causes only ECDHE cipher suites to be enabled. 131 // If true, causes only ECDHE cipher suites to be enabled.
121 bool require_ecdhe; 132 bool require_ecdhe;
122 133
123 // TODO(wtc): move the following members to a new SSLParams structure. They 134 // TODO(wtc): move the following members to a new SSLParams structure. They
124 // are not SSL configuration settings. 135 // are not SSL configuration settings.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 178
168 // The list of application-level protocols to enable renegotiation for. 179 // The list of application-level protocols to enable renegotiation for.
169 NextProtoVector renego_allowed_for_protos; 180 NextProtoVector renego_allowed_for_protos;
170 181
171 scoped_refptr<X509Certificate> client_cert; 182 scoped_refptr<X509Certificate> client_cert;
172 }; 183 };
173 184
174 } // namespace net 185 } // namespace net
175 186
176 #endif // NET_SSL_SSL_CONFIG_H_ 187 #endif // NET_SSL_SSL_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698