Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 416683002: This CL corrects a bug in which the OnHandshakeComplete callback for an ssl session was never called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@r2
Patch Set: Added SessionIsGood method to replace completion count when checking if a session is finished. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket_openssl.h
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index ac65710bd1e683c023994fd7aebb914b1605ae50..aa5b2588c5bdbf258ec2aef555e261299eee355b 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -95,6 +95,9 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
virtual int SetReceiveBufferSize(int32 size) OVERRIDE;
virtual int SetSendBufferSize(int32 size) OVERRIDE;
+ // Sets |ran_session_finished_callback_| to true.
+ void SetSSLHandshakeComplete();
Ryan Sleevi 2014/08/06 23:42:03 This doesn't need to be a public method Explanati
mshelley 2014/08/07 00:21:59 Done.
+
protected:
// SSLClientSocket implementation.
virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
@@ -106,6 +109,9 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
friend class SSLClientSocket;
friend class SSLContext;
+ // Callback that is run by OpenSSL when a session's handshake has finished.
+ static void OnSessionFinishedCallback(const SSL* ssl, int result, int unused);
+
int Init();
void DoReadCallback(int result);
void DoWriteCallback(int result);
@@ -168,6 +174,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
const char *argp, int argi, long argl,
long retvalue);
+ void CheckIfSessionFinished();
+
bool transport_send_busy_;
bool transport_recv_busy_;
@@ -268,6 +276,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
std::string channel_id_cert_;
// True if channel ID extension was negotiated.
bool channel_id_xtn_negotiated_;
+ // True if OnSessionFinishedCallback has been run.
+ bool ran_session_finished_callback_;
// The request handle for |channel_id_service_|.
ChannelIDService::RequestHandle channel_id_request_handle_;
BoundNetLog net_log_;

Powered by Google App Engine
This is Rietveld 408576698