Chromium Code Reviews| Index: net/socket/ssl_client_socket.h |
| diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h |
| index 9993bb6b64c19bcf0855471e093349c81c3784ee..640a533ecebeff1bdfad00f7022790a1f4485cac 100644 |
| --- a/net/socket/ssl_client_socket.h |
| +++ b/net/socket/ssl_client_socket.h |
| @@ -18,6 +18,8 @@ namespace net { |
| class CertVerifier; |
| class CTVerifier; |
| +class HostPortPair; |
| +class ServerBoundCertService; |
|
wtc
2014/07/31 23:05:24
Sort in alphabetical order.
mshelley
2014/08/02 23:59:15
Done.
|
| class ChannelIDService; |
| class SSLCertRequestInfo; |
| struct SSLConfig; |
| @@ -81,6 +83,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( |
| @@ -93,7 +135,8 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { |
| // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
| // kNextProtoNoOverlap: *proto is set to the first protocol in the |
| // supported list. |
| - virtual NextProtoStatus GetNextProto(std::string* proto) = 0; |
| + virtual NextProtoStatus GetNextProto(std::string* proto, |
| + std::string* serer_protos) = 0; |
|
wtc
2014/07/31 23:05:24
IMPORTANT: is this part of the CL?
mshelley
2014/08/02 23:59:15
Done.
|
| static NextProto NextProtoFromString(const std::string& proto_string); |