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 d16bb8d6325ec6b105da7219d4e9ea9e5f6f4828..01cc2076308834312afcc0fc21e8b82b03137920 100644 |
--- a/net/socket/ssl_session_cache_openssl.cc |
+++ b/net/socket/ssl_session_cache_openssl.cc |
@@ -236,6 +236,14 @@ class SSLSessionCacheOpenSSLImpl { |
return SSL_set_session(ssl, session) == 1; |
} |
+ bool SessionIsInCache(const std::string& cache_key) { |
wtc
2014/06/13 22:47:24
Mark this method const.
mshelley1
2014/06/16 19:02:50
Done.
|
+ base::AutoLock locked(lock_); |
+ KeyIndex::iterator it = key_index_.find(cache_key); |
+ if (it == key_index_.end()) |
+ return false; |
+ return true; |
+ } |
+ |
void MarkSSLSessionAsGood(SSL* ssl) { |
SSL_SESSION* session = SSL_get_session(ssl); |
if (!session) |
@@ -499,6 +507,10 @@ bool SSLSessionCacheOpenSSL::SetSSLSessionWithKey( |
return impl_->SetSSLSessionWithKey(ssl, cache_key); |
} |
+bool SSLSessionCacheOpenSSL::SessionIsInCache(const std::string& cache_key) { |
+ return impl_->SessionIsInCache(cache_key); |
+} |
+ |
void SSLSessionCacheOpenSSL::MarkSSLSessionAsGood(SSL* ssl) { |
return impl_->MarkSSLSessionAsGood(ssl); |
} |