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