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_SOCKET_SSL_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
11 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
12 #include "net/base/load_flags.h" | 14 #include "net/base/load_flags.h" |
13 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
14 #include "net/socket/ssl_socket.h" | 16 #include "net/socket/ssl_socket.h" |
15 #include "net/socket/stream_socket.h" | 17 #include "net/socket/stream_socket.h" |
16 #include "net/ssl/ssl_failure_state.h" | 18 #include "net/ssl/ssl_failure_state.h" |
17 | 19 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 176 |
175 // Returns whether TLS channel ID is enabled. | 177 // Returns whether TLS channel ID is enabled. |
176 static bool IsChannelIDEnabled( | 178 static bool IsChannelIDEnabled( |
177 const SSLConfig& ssl_config, | 179 const SSLConfig& ssl_config, |
178 ChannelIDService* channel_id_service); | 180 ChannelIDService* channel_id_service); |
179 | 181 |
180 // Determine if there is at least one enabled cipher suite that satisfies | 182 // Determine if there is at least one enabled cipher suite that satisfies |
181 // Section 9.2 of the HTTP/2 specification. Note that the server might still | 183 // Section 9.2 of the HTTP/2 specification. Note that the server might still |
182 // pick an inadequate cipher suite. | 184 // pick an inadequate cipher suite. |
183 static bool HasCipherAdequateForHTTP2( | 185 static bool HasCipherAdequateForHTTP2( |
184 const std::vector<uint16>& cipher_suites); | 186 const std::vector<uint16_t>& cipher_suites); |
185 | 187 |
186 // Determine if the TLS version required by Section 9.2 of the HTTP/2 | 188 // Determine if the TLS version required by Section 9.2 of the HTTP/2 |
187 // specification is enabled. Note that the server might still pick an | 189 // specification is enabled. Note that the server might still pick an |
188 // inadequate TLS version. | 190 // inadequate TLS version. |
189 static bool IsTLSVersionAdequateForHTTP2(const SSLConfig& ssl_config); | 191 static bool IsTLSVersionAdequateForHTTP2(const SSLConfig& ssl_config); |
190 | 192 |
191 // Serialize |next_protos| in the wire format for ALPN and NPN: protocols are | 193 // Serialize |next_protos| in the wire format for ALPN and NPN: protocols are |
192 // listed in order, each prefixed by a one-byte length. | 194 // listed in order, each prefixed by a one-byte length. |
193 static std::vector<uint8_t> SerializeNextProtos( | 195 static std::vector<uint8_t> SerializeNextProtos( |
194 const NextProtoVector& next_protos); | 196 const NextProtoVector& next_protos); |
(...skipping 14 matching lines...) Expand all Loading... |
209 bool signed_cert_timestamps_received_; | 211 bool signed_cert_timestamps_received_; |
210 // True if a stapled OCSP response was received. | 212 // True if a stapled OCSP response was received. |
211 bool stapled_ocsp_response_received_; | 213 bool stapled_ocsp_response_received_; |
212 // Protocol negotiation extension used. | 214 // Protocol negotiation extension used. |
213 SSLNegotiationExtension negotiation_extension_; | 215 SSLNegotiationExtension negotiation_extension_; |
214 }; | 216 }; |
215 | 217 |
216 } // namespace net | 218 } // namespace net |
217 | 219 |
218 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 220 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |