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> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
14 #include "net/base/load_flags.h" | 14 #include "net/base/load_flags.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/socket/ssl_socket.h" | 16 #include "net/socket/ssl_socket.h" |
17 #include "net/socket/stream_socket.h" | 17 #include "net/socket/stream_socket.h" |
18 #include "net/ssl/ssl_failure_state.h" | 18 #include "net/ssl/ssl_failure_state.h" |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class FilePath; | 21 class FilePath; |
22 class SequencedTaskRunner; | 22 class SequencedTaskRunner; |
23 } | 23 } |
24 | 24 |
| 25 namespace crypto { |
| 26 class ECPrivateKey; |
| 27 } |
| 28 |
25 namespace net { | 29 namespace net { |
26 | 30 |
27 class CTPolicyEnforcer; | 31 class CTPolicyEnforcer; |
28 class CertVerifier; | 32 class CertVerifier; |
29 class ChannelIDService; | 33 class ChannelIDService; |
30 class CTVerifier; | 34 class CTVerifier; |
31 class SSLCertRequestInfo; | 35 class SSLCertRequestInfo; |
32 struct SSLConfig; | 36 struct SSLConfig; |
33 class SSLInfo; | 37 class SSLInfo; |
34 class TransportSecurityState; | 38 class TransportSecurityState; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 static bool IgnoreCertError(int error, int load_flags); | 141 static bool IgnoreCertError(int error, int load_flags); |
138 | 142 |
139 // ClearSessionCache clears the SSL session cache, used to resume SSL | 143 // ClearSessionCache clears the SSL session cache, used to resume SSL |
140 // sessions. | 144 // sessions. |
141 static void ClearSessionCache(); | 145 static void ClearSessionCache(); |
142 | 146 |
143 // Returns the ChannelIDService used by this socket, or NULL if | 147 // Returns the ChannelIDService used by this socket, or NULL if |
144 // channel ids are not supported. | 148 // channel ids are not supported. |
145 virtual ChannelIDService* GetChannelIDService() const = 0; | 149 virtual ChannelIDService* GetChannelIDService() const = 0; |
146 | 150 |
| 151 // Signs the EKM value for Token Binding with |*key| and puts it in |*out|. |
| 152 // Returns a net error code. |
| 153 virtual Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 154 std::vector<uint8_t>* out) = 0; |
| 155 |
147 // Returns the state of the handshake when it failed, or |SSL_FAILURE_NONE| if | 156 // Returns the state of the handshake when it failed, or |SSL_FAILURE_NONE| if |
148 // the handshake succeeded. This is used to classify causes of the TLS version | 157 // the handshake succeeded. This is used to classify causes of the TLS version |
149 // fallback. | 158 // fallback. |
150 virtual SSLFailureState GetSSLFailureState() const = 0; | 159 virtual SSLFailureState GetSSLFailureState() const = 0; |
151 | 160 |
152 protected: | 161 protected: |
153 void set_negotiation_extension( | 162 void set_negotiation_extension( |
154 SSLNegotiationExtension negotiation_extension) { | 163 SSLNegotiationExtension negotiation_extension) { |
155 negotiation_extension_ = negotiation_extension; | 164 negotiation_extension_ = negotiation_extension; |
156 } | 165 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 bool signed_cert_timestamps_received_; | 220 bool signed_cert_timestamps_received_; |
212 // True if a stapled OCSP response was received. | 221 // True if a stapled OCSP response was received. |
213 bool stapled_ocsp_response_received_; | 222 bool stapled_ocsp_response_received_; |
214 // Protocol negotiation extension used. | 223 // Protocol negotiation extension used. |
215 SSLNegotiationExtension negotiation_extension_; | 224 SSLNegotiationExtension negotiation_extension_; |
216 }; | 225 }; |
217 | 226 |
218 } // namespace net | 227 } // namespace net |
219 | 228 |
220 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 229 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |