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

Unified Diff: net/socket/ssl_session_cache_openssl.cc

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: Created 6 years, 5 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
« no previous file with comments | « net/socket/ssl_session_cache_openssl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_session_cache_openssl.cc
diff --git a/net/socket/ssl_session_cache_openssl.cc b/net/socket/ssl_session_cache_openssl.cc
index dca1c48a8d4c8b0b8c4165c1967f4a06208c9f33..8708f365c070b81f91cb3332def98ca2c1b49203 100644
--- a/net/socket/ssl_session_cache_openssl.cc
+++ b/net/socket/ssl_session_cache_openssl.cc
@@ -258,9 +258,7 @@ class SSLSessionCacheOpenSSLImpl {
ssl, CallbackAndCompletionCount(callback, 0)));
}
davidben 2014/07/29 19:16:01 The completion count thing is a little non-obvious
mshelley 2014/08/05 23:17:11 Done.
- // Determines if the session for |ssl| is in the cache, and calls the
- // appropriate callback if that is the case.
- void CheckIfSessionFinished(SSL* ssl) {
+ void CheckIfSessionFinished(const SSL* ssl) {
SSLToCallbackMap::iterator it = ssl_to_callback_map_.find(ssl);
if (it == ssl_to_callback_map_.end())
return;
@@ -327,7 +325,7 @@ class SSLSessionCacheOpenSSLImpl {
// Type for a dictionary from SessionId values to key index nodes.
typedef base::hash_map<SessionId, KeyIndex::iterator> SessionIdIndex;
// Type for a map from SSL* to associated callbacks
- typedef std::map<SSL*, CallbackAndCompletionCount> SSLToCallbackMap;
+ typedef std::map<const SSL*, CallbackAndCompletionCount> SSLToCallbackMap;
// Return the key associated with a given session, or the empty string if
// none exist. This shall only be used for debugging.
@@ -407,7 +405,6 @@ class SSLSessionCacheOpenSSLImpl {
static int NewSessionCallbackStatic(SSL* ssl, SSL_SESSION* session) {
SSLSessionCacheOpenSSLImpl* cache = GetCache(ssl->ctx);
cache->OnSessionAdded(ssl, session);
- cache->CheckIfSessionFinished(ssl);
return 1;
}
@@ -570,6 +567,10 @@ bool SSLSessionCacheOpenSSL::SSLSessionIsInCache(
return impl_->SSLSessionIsInCache(cache_key);
}
+void SSLSessionCacheOpenSSL::CheckIfSessionFinished(const SSL* ssl) {
+ impl_->CheckIfSessionFinished(ssl);
+}
+
void SSLSessionCacheOpenSSL::RemoveSessionAddedCallback(SSL* ssl) {
impl_->RemoveSessionAddedCallback(ssl);
}
« no previous file with comments | « net/socket/ssl_session_cache_openssl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698