| 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 std::string GetSessionCacheKey() const OVERRIDE; |
| 60 virtual bool InSessionCache() const OVERRIDE; | 61 virtual bool InSessionCache() const OVERRIDE; |
| 61 virtual void SetHandshakeCompletionCallback( | 62 virtual void SetHandshakeCompletionCallback( |
| 62 const base::Closure& callback) OVERRIDE; | 63 const base::Closure& callback) OVERRIDE; |
| 63 virtual void GetSSLCertRequestInfo( | 64 virtual void GetSSLCertRequestInfo( |
| 64 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 65 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
| 65 virtual NextProtoStatus GetNextProto(std::string* proto) OVERRIDE; | 66 virtual NextProtoStatus GetNextProto(std::string* proto) OVERRIDE; |
| 66 virtual ChannelIDService* GetChannelIDService() const OVERRIDE; | 67 virtual ChannelIDService* GetChannelIDService() const OVERRIDE; |
| 67 | 68 |
| 68 // SSLSocket implementation. | 69 // SSLSocket implementation. |
| 69 virtual int ExportKeyingMaterial(const base::StringPiece& label, | 70 virtual int ExportKeyingMaterial(const base::StringPiece& label, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 private: | 104 private: |
| 104 class PeerCertificateChain; | 105 class PeerCertificateChain; |
| 105 class SSLContext; | 106 class SSLContext; |
| 106 friend class SSLClientSocket; | 107 friend class SSLClientSocket; |
| 107 friend class SSLContext; | 108 friend class SSLContext; |
| 108 | 109 |
| 109 int Init(); | 110 int Init(); |
| 110 void DoReadCallback(int result); | 111 void DoReadCallback(int result); |
| 111 void DoWriteCallback(int result); | 112 void DoWriteCallback(int result); |
| 112 | 113 |
| 113 // Compute a unique key string for the SSL session cache. | |
| 114 std::string GetSessionCacheKey() const; | |
| 115 void OnHandshakeCompletion(); | 114 void OnHandshakeCompletion(); |
| 116 | 115 |
| 117 bool DoTransportIO(); | 116 bool DoTransportIO(); |
| 118 int DoHandshake(); | 117 int DoHandshake(); |
| 119 int DoChannelIDLookup(); | 118 int DoChannelIDLookup(); |
| 120 int DoChannelIDLookupComplete(int result); | 119 int DoChannelIDLookupComplete(int result); |
| 121 int DoVerifyCert(int result); | 120 int DoVerifyCert(int result); |
| 122 int DoVerifyCertComplete(int result); | 121 int DoVerifyCertComplete(int result); |
| 123 void DoConnectCallback(int result); | 122 void DoConnectCallback(int result); |
| 124 X509Certificate* UpdateServerCert(); | 123 X509Certificate* UpdateServerCert(); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // TransportSecurityState::CheckPublicKeyPins in the event of a | 287 // TransportSecurityState::CheckPublicKeyPins in the event of a |
| 289 // pinning failure. It is a (somewhat) human-readable string. | 288 // pinning failure. It is a (somewhat) human-readable string. |
| 290 std::string pinning_failure_log_; | 289 std::string pinning_failure_log_; |
| 291 | 290 |
| 292 BoundNetLog net_log_; | 291 BoundNetLog net_log_; |
| 293 }; | 292 }; |
| 294 | 293 |
| 295 } // namespace net | 294 } // namespace net |
| 296 | 295 |
| 297 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 296 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| OLD | NEW |