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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // of SSLClientSocket. | 97 // of SSLClientSocket. |
98 virtual bool InSessionCache() const = 0; | 98 virtual bool InSessionCache() const = 0; |
99 | 99 |
100 // Tells the session cache to monitor this socket's session and inform | 100 // Tells the session cache to monitor this socket's session and inform |
101 // its SSLConnectJobMessenger upon the session's handshake's completion. | 101 // its SSLConnectJobMessenger upon the session's handshake's completion. |
102 virtual void SetHandshakeSuccessCallback(const base::Closure& callback) = 0; | 102 virtual void SetHandshakeSuccessCallback(const base::Closure& callback) = 0; |
103 | 103 |
104 // Sets the callback to be used if the socket's ssl handshake should fail. | 104 // Sets the callback to be used if the socket's ssl handshake should fail. |
105 virtual void SetHandshakeFailureCallback(const base::Closure& callback) = 0; | 105 virtual void SetHandshakeFailureCallback(const base::Closure& callback) = 0; |
106 | 106 |
| 107 // In the case of a failed connection, run the appropriate callback. |
| 108 virtual void OnSocketFailure() = 0; |
| 109 |
107 // Gets the SSL CertificateRequest info of the socket after Connect failed | 110 // Gets the SSL CertificateRequest info of the socket after Connect failed |
108 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. | 111 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. |
109 virtual void GetSSLCertRequestInfo( | 112 virtual void GetSSLCertRequestInfo( |
110 SSLCertRequestInfo* cert_request_info) = 0; | 113 SSLCertRequestInfo* cert_request_info) = 0; |
111 | 114 |
112 // Get the application level protocol that we negotiated with the server. | 115 // Get the application level protocol that we negotiated with the server. |
113 // *proto is set to the resulting protocol (n.b. that the string may have | 116 // *proto is set to the resulting protocol (n.b. that the string may have |
114 // embedded NULs). | 117 // embedded NULs). |
115 // kNextProtoUnsupported: *proto is cleared. | 118 // kNextProtoUnsupported: *proto is cleared. |
116 // kNextProtoNegotiated: *proto is set to the negotiated protocol. | 119 // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 bool channel_id_sent_; | 209 bool channel_id_sent_; |
207 // True if SCTs were received via a TLS extension. | 210 // True if SCTs were received via a TLS extension. |
208 bool signed_cert_timestamps_received_; | 211 bool signed_cert_timestamps_received_; |
209 // True if a stapled OCSP response was received. | 212 // True if a stapled OCSP response was received. |
210 bool stapled_ocsp_response_received_; | 213 bool stapled_ocsp_response_received_; |
211 }; | 214 }; |
212 | 215 |
213 } // namespace net | 216 } // namespace net |
214 | 217 |
215 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 218 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |