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_OPENSSL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 const SSLConfig& ssl_config, | 50 const SSLConfig& ssl_config, |
51 const SSLClientSocketContext& context); | 51 const SSLClientSocketContext& context); |
52 virtual ~SSLClientSocketOpenSSL(); | 52 virtual ~SSLClientSocketOpenSSL(); |
53 | 53 |
54 const HostPortPair& host_and_port() const { return host_and_port_; } | 54 const HostPortPair& host_and_port() const { return host_and_port_; } |
55 const std::string& ssl_session_cache_shard() const { | 55 const std::string& ssl_session_cache_shard() const { |
56 return ssl_session_cache_shard_; | 56 return ssl_session_cache_shard_; |
57 } | 57 } |
58 | 58 |
59 // SSLClientSocket implementation. | 59 // SSLClientSocket implementation. |
60 virtual bool InSessionCache() const OVERRIDE; | |
61 virtual void OnSessionComplete(const base::Closure& cb) const OVERRIDE; | |
62 virtual void OnSocketFailure(const base::Closure& cb) OVERRIDE; | |
Ryan Sleevi
2014/06/26 01:47:16
For API simplicitly, we may want to combine these
mshelley
2014/07/01 02:35:22
Done.
| |
60 virtual void GetSSLCertRequestInfo( | 63 virtual void GetSSLCertRequestInfo( |
61 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 64 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
62 virtual NextProtoStatus GetNextProto(std::string* proto, | 65 virtual NextProtoStatus GetNextProto(std::string* proto, |
63 std::string* server_protos) OVERRIDE; | 66 std::string* server_protos) OVERRIDE; |
64 virtual ServerBoundCertService* GetServerBoundCertService() const OVERRIDE; | 67 virtual ServerBoundCertService* GetServerBoundCertService() const OVERRIDE; |
65 | 68 |
66 // SSLSocket implementation. | 69 // SSLSocket implementation. |
67 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 70 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
68 bool has_context, | 71 bool has_context, |
69 const base::StringPiece& context, | 72 const base::StringPiece& context, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 // List of SSLClientCertType values for client certificates allowed by the | 204 // List of SSLClientCertType values for client certificates allowed by the |
202 // server. | 205 // server. |
203 std::vector<SSLClientCertType> cert_key_types_; | 206 std::vector<SSLClientCertType> cert_key_types_; |
204 | 207 |
205 CertVerifier* const cert_verifier_; | 208 CertVerifier* const cert_verifier_; |
206 scoped_ptr<SingleRequestCertVerifier> verifier_; | 209 scoped_ptr<SingleRequestCertVerifier> verifier_; |
207 | 210 |
208 // The service for retrieving Channel ID keys. May be NULL. | 211 // The service for retrieving Channel ID keys. May be NULL. |
209 ServerBoundCertService* server_bound_cert_service_; | 212 ServerBoundCertService* server_bound_cert_service_; |
210 | 213 |
214 // Callback that is invoked when the connection encounters an error. | |
215 base::Closure error_callback_; | |
216 | |
211 // OpenSSL stuff | 217 // OpenSSL stuff |
212 SSL* ssl_; | 218 SSL* ssl_; |
213 BIO* transport_bio_; | 219 BIO* transport_bio_; |
214 | 220 |
215 scoped_ptr<ClientSocketHandle> transport_; | 221 scoped_ptr<ClientSocketHandle> transport_; |
216 const HostPortPair host_and_port_; | 222 const HostPortPair host_and_port_; |
217 SSLConfig ssl_config_; | 223 SSLConfig ssl_config_; |
218 // ssl_session_cache_shard_ is an opaque string that partitions the SSL | 224 // ssl_session_cache_shard_ is an opaque string that partitions the SSL |
219 // session cache. i.e. sessions created with one value will not attempt to | 225 // session cache. i.e. sessions created with one value will not attempt to |
220 // resume on the socket with a different value. | 226 // resume on the socket with a different value. |
(...skipping 20 matching lines...) Expand all Loading... | |
241 // True if channel ID extension was negotiated. | 247 // True if channel ID extension was negotiated. |
242 bool channel_id_xtn_negotiated_; | 248 bool channel_id_xtn_negotiated_; |
243 // The request handle for |server_bound_cert_service_|. | 249 // The request handle for |server_bound_cert_service_|. |
244 ServerBoundCertService::RequestHandle channel_id_request_handle_; | 250 ServerBoundCertService::RequestHandle channel_id_request_handle_; |
245 BoundNetLog net_log_; | 251 BoundNetLog net_log_; |
246 }; | 252 }; |
247 | 253 |
248 } // namespace net | 254 } // namespace net |
249 | 255 |
250 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 256 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
OLD | NEW |