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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "crypto/ec_private_key.h" |
11 #include "net/base/completion_callback.h" | 12 #include "net/base/completion_callback.h" |
12 #include "net/base/load_flags.h" | 13 #include "net/base/load_flags.h" |
13 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
14 #include "net/socket/ssl_socket.h" | 15 #include "net/socket/ssl_socket.h" |
15 #include "net/socket/stream_socket.h" | 16 #include "net/socket/stream_socket.h" |
16 #include "net/ssl/ssl_failure_state.h" | 17 #include "net/ssl/ssl_failure_state.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 | 20 |
20 class CertPolicyEnforcer; | 21 class CertPolicyEnforcer; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 static bool IgnoreCertError(int error, int load_flags); | 124 static bool IgnoreCertError(int error, int load_flags); |
124 | 125 |
125 // ClearSessionCache clears the SSL session cache, used to resume SSL | 126 // ClearSessionCache clears the SSL session cache, used to resume SSL |
126 // sessions. | 127 // sessions. |
127 static void ClearSessionCache(); | 128 static void ClearSessionCache(); |
128 | 129 |
129 // Returns the ChannelIDService used by this socket, or NULL if | 130 // Returns the ChannelIDService used by this socket, or NULL if |
130 // channel ids are not supported. | 131 // channel ids are not supported. |
131 virtual ChannelIDService* GetChannelIDService() const = 0; | 132 virtual ChannelIDService* GetChannelIDService() const = 0; |
132 | 133 |
| 134 // Signs the EKM value for Token binding with |*key| and puts it in |*out|. |
| 135 // Returns a net error code of ERR_FAILED or OK. |
| 136 virtual int GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 137 std::vector<uint8_t>* out) = 0; |
| 138 |
133 // Returns the state of the handshake when it failed, or |SSL_FAILURE_NONE| if | 139 // Returns the state of the handshake when it failed, or |SSL_FAILURE_NONE| if |
134 // the handshake succeeded. This is used to classify causes of the TLS version | 140 // the handshake succeeded. This is used to classify causes of the TLS version |
135 // fallback. | 141 // fallback. |
136 virtual SSLFailureState GetSSLFailureState() const = 0; | 142 virtual SSLFailureState GetSSLFailureState() const = 0; |
137 | 143 |
138 protected: | 144 protected: |
139 void set_negotiation_extension( | 145 void set_negotiation_extension( |
140 SSLNegotiationExtension negotiation_extension) { | 146 SSLNegotiationExtension negotiation_extension) { |
141 negotiation_extension_ = negotiation_extension; | 147 negotiation_extension_ = negotiation_extension; |
142 } | 148 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 bool signed_cert_timestamps_received_; | 203 bool signed_cert_timestamps_received_; |
198 // True if a stapled OCSP response was received. | 204 // True if a stapled OCSP response was received. |
199 bool stapled_ocsp_response_received_; | 205 bool stapled_ocsp_response_received_; |
200 // Protocol negotiation extension used. | 206 // Protocol negotiation extension used. |
201 SSLNegotiationExtension negotiation_extension_; | 207 SSLNegotiationExtension negotiation_extension_; |
202 }; | 208 }; |
203 | 209 |
204 } // namespace net | 210 } // namespace net |
205 | 211 |
206 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 212 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |