| Index: net/socket/ssl_client_socket.h
|
| diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
|
| index a43e58cc26b852fb86d92a1a5ac7c4e7c357b286..d2f84e1e6b8f561bd9616575b7e937410a71ea6e 100644
|
| --- a/net/socket/ssl_client_socket.h
|
| +++ b/net/socket/ssl_client_socket.h
|
| @@ -18,6 +18,7 @@ namespace net {
|
|
|
| class CertVerifier;
|
| class CTVerifier;
|
| +class HostPortPair;
|
| class ServerBoundCertService;
|
| class SSLCertRequestInfo;
|
| struct SSLConfig;
|
| @@ -81,6 +82,46 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
|
| virtual bool WasNpnNegotiated() const OVERRIDE;
|
| virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
|
|
|
| + // Formats a unique key for the SSL session cache. This method
|
| + // is necessary so that all classes create cache keys in a consistent
|
| + // manner.
|
| + // TODO(mshelley) This method will be deleted in an upcoming CL when
|
| + // it will no longer be necessary to generate a cache key outside of
|
| + // an SSLClientSocket.
|
| + static std::string CreateSessionCacheKey(
|
| + const HostPortPair& host_and_port,
|
| + const std::string& ssl_session_cache_shard);
|
| +
|
| + // Returns true if there is a cache entry in the SSL session cache
|
| + // for the cache key of the SSL socket.
|
| + //
|
| + // The cache key consists of a host and port concatenated with a session
|
| + // cache shard. These two strings are passed to the constructor of most
|
| + // subclasses of SSLClientSocket.
|
| + virtual bool InSessionCache() const = 0;
|
| +
|
| + // Sets |callback| to be run when the handshake has fully completed.
|
| + // For example, in the case of False Start, Connect() will return
|
| + // early, before the peer's TLS Finished message has been verified,
|
| + // in order to allow the caller to call Write() and send application
|
| + // data with the client's Finished message.
|
| + // In such situations, |callback| will be invoked sometime after
|
| + // Connect() - either during a Write() or Read() call, and before
|
| + // invoking the Read() or Write() callback.
|
| + // Otherwise, during a traditional TLS connection (i.e. no False
|
| + // Start), this will be called right before the Connect() callback
|
| + // is called.
|
| + //
|
| + // Note that it's not valid to mutate this socket during such
|
| + // callbacks, including deleting the socket.
|
| + //
|
| + // TODO(mshelley): Provide additional details about whether or not
|
| + // the handshake actually succeeded or not. This can be inferred
|
| + // from the result to Connect()/Read()/Write(), but may be useful
|
| + // to inform here as well.
|
| + virtual void SetHandshakeCompletionCallback(
|
| + const base::Closure& callback) = 0;
|
| +
|
| // Gets the SSL CertificateRequest info of the socket after Connect failed
|
| // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED.
|
| virtual void GetSSLCertRequestInfo(
|
|
|