Chromium Code Reviews| 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 "crypto/ec_private_key.h" | |
|
davidben
2016/01/22 00:19:21
Can be forward-declared.
nharper
2016/01/22 19:36:52
Done.
| |
| 13 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 14 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
| 15 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 16 #include "net/socket/ssl_socket.h" | 17 #include "net/socket/ssl_socket.h" |
| 17 #include "net/socket/stream_socket.h" | 18 #include "net/socket/stream_socket.h" |
| 18 #include "net/ssl/ssl_failure_state.h" | 19 #include "net/ssl/ssl_failure_state.h" |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class FilePath; | 22 class FilePath; |
| 22 class SequencedTaskRunner; | 23 class SequencedTaskRunner; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 static bool IgnoreCertError(int error, int load_flags); | 138 static bool IgnoreCertError(int error, int load_flags); |
| 138 | 139 |
| 139 // ClearSessionCache clears the SSL session cache, used to resume SSL | 140 // ClearSessionCache clears the SSL session cache, used to resume SSL |
| 140 // sessions. | 141 // sessions. |
| 141 static void ClearSessionCache(); | 142 static void ClearSessionCache(); |
| 142 | 143 |
| 143 // Returns the ChannelIDService used by this socket, or NULL if | 144 // Returns the ChannelIDService used by this socket, or NULL if |
| 144 // channel ids are not supported. | 145 // channel ids are not supported. |
| 145 virtual ChannelIDService* GetChannelIDService() const = 0; | 146 virtual ChannelIDService* GetChannelIDService() const = 0; |
| 146 | 147 |
| 148 // Signs the EKM value for Token Binding with |*key| and puts it in |*out|. | |
| 149 // Returns a net error code of ERR_FAILED or OK. | |
|
davidben
2016/01/22 00:19:21
Nit: Also returns ERR_NOT_IMPLEMENTED, strictly sp
nharper
2016/01/22 19:36:52
Done. I also changed the same method in HttpStream
| |
| 150 virtual int GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | |
| 151 std::vector<uint8_t>* out) = 0; | |
| 152 | |
| 147 // Returns the state of the handshake when it failed, or |SSL_FAILURE_NONE| if | 153 // 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 | 154 // the handshake succeeded. This is used to classify causes of the TLS version |
| 149 // fallback. | 155 // fallback. |
| 150 virtual SSLFailureState GetSSLFailureState() const = 0; | 156 virtual SSLFailureState GetSSLFailureState() const = 0; |
| 151 | 157 |
| 152 protected: | 158 protected: |
| 153 void set_negotiation_extension( | 159 void set_negotiation_extension( |
| 154 SSLNegotiationExtension negotiation_extension) { | 160 SSLNegotiationExtension negotiation_extension) { |
| 155 negotiation_extension_ = negotiation_extension; | 161 negotiation_extension_ = negotiation_extension; |
| 156 } | 162 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 bool signed_cert_timestamps_received_; | 217 bool signed_cert_timestamps_received_; |
| 212 // True if a stapled OCSP response was received. | 218 // True if a stapled OCSP response was received. |
| 213 bool stapled_ocsp_response_received_; | 219 bool stapled_ocsp_response_received_; |
| 214 // Protocol negotiation extension used. | 220 // Protocol negotiation extension used. |
| 215 SSLNegotiationExtension negotiation_extension_; | 221 SSLNegotiationExtension negotiation_extension_; |
| 216 }; | 222 }; |
| 217 | 223 |
| 218 } // namespace net | 224 } // namespace net |
| 219 | 225 |
| 220 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 226 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
| OLD | NEW |