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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 kNextProtoUnsupported = 0, // The server doesn't support NPN. | 74 kNextProtoUnsupported = 0, // The server doesn't support NPN. |
| 75 kNextProtoNegotiated = 1, // We agreed on a protocol. | 75 kNextProtoNegotiated = 1, // We agreed on a protocol. |
| 76 kNextProtoNoOverlap = 2, // No protocols in common. We requested | 76 kNextProtoNoOverlap = 2, // No protocols in common. We requested |
| 77 // the first protocol in our list. | 77 // the first protocol in our list. |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 // StreamSocket: | 80 // StreamSocket: |
| 81 virtual bool WasNpnNegotiated() const OVERRIDE; | 81 virtual bool WasNpnNegotiated() const OVERRIDE; |
| 82 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 82 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
| 83 | 83 |
| 84 // Returns true if there is a cache entry in the ssl session cache | |
| 85 // for the given cache key. | |
| 86 // | |
| 87 // The cache key consists of a host_and_poart concatenated with a session | |
|
wtc
2014/06/27 00:36:49
Typo: poart => port
mshelley
2014/07/01 02:35:22
Done.
| |
| 88 // cache shard. | |
| 89 virtual bool InSessionCache() const = 0; | |
| 90 | |
| 91 virtual void OnSessionComplete(const base::Closure& c) const = 0; | |
| 92 | |
| 93 virtual void OnSocketFailure(const base::Closure& cb) = 0; | |
|
wtc
2014/06/27 00:36:49
1. Document these two methods.
2. Don't abbreviat
mshelley
2014/07/01 02:35:22
Done.
| |
| 94 | |
| 84 // Gets the SSL CertificateRequest info of the socket after Connect failed | 95 // Gets the SSL CertificateRequest info of the socket after Connect failed |
| 85 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. | 96 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. |
| 86 virtual void GetSSLCertRequestInfo( | 97 virtual void GetSSLCertRequestInfo( |
| 87 SSLCertRequestInfo* cert_request_info) = 0; | 98 SSLCertRequestInfo* cert_request_info) = 0; |
| 88 | 99 |
| 89 // Get the application level protocol that we negotiated with the server. | 100 // Get the application level protocol that we negotiated with the server. |
| 90 // *proto is set to the resulting protocol (n.b. that the string may have | 101 // *proto is set to the resulting protocol (n.b. that the string may have |
| 91 // embedded NULs). | 102 // embedded NULs). |
| 92 // kNextProtoUnsupported: *proto is cleared. | 103 // kNextProtoUnsupported: *proto is cleared. |
| 93 // kNextProtoNegotiated: *proto is set to the negotiated protocol. | 104 // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 // True if NPN successfully negotiated SPDY. | 189 // True if NPN successfully negotiated SPDY. |
| 179 bool was_spdy_negotiated_; | 190 bool was_spdy_negotiated_; |
| 180 // Protocol that we negotiated with the server. | 191 // Protocol that we negotiated with the server. |
| 181 NextProto protocol_negotiated_; | 192 NextProto protocol_negotiated_; |
| 182 // True if a channel ID was sent. | 193 // True if a channel ID was sent. |
| 183 bool channel_id_sent_; | 194 bool channel_id_sent_; |
| 184 // True if SCTs were received via a TLS extension. | 195 // True if SCTs were received via a TLS extension. |
| 185 bool signed_cert_timestamps_received_; | 196 bool signed_cert_timestamps_received_; |
| 186 // True if a stapled OCSP response was received. | 197 // True if a stapled OCSP response was received. |
| 187 bool stapled_ocsp_response_received_; | 198 bool stapled_ocsp_response_received_; |
| 199 | |
| 200 // Callback that is invoked when the connection encounters an error. | |
| 201 base::Closure error_callback_; | |
|
wtc
2014/06/27 00:36:49
Delete this? SSLClientSocketOpenSSL has a same-nam
mshelley
2014/07/01 02:35:22
Done.
| |
| 188 }; | 202 }; |
| 189 | 203 |
| 190 } // namespace net | 204 } // namespace net |
| 191 | 205 |
| 192 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 206 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
| OLD | NEW |