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

Unified Diff: net/base/ssl_client_auth_cache.cc

Issue 4568002: Remember if a user declines to provide a server with a client certificate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and wtc feedback Created 10 years, 1 month 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/base/ssl_client_auth_cache.h ('k') | net/base/ssl_client_auth_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_client_auth_cache.cc
diff --git a/net/base/ssl_client_auth_cache.cc b/net/base/ssl_client_auth_cache.cc
index d2f47cc2b0c61a92335fa7e59657b05ec8253875..355073f250b2145e07554da249139a2006641218 100644
--- a/net/base/ssl_client_auth_cache.cc
+++ b/net/base/ssl_client_auth_cache.cc
@@ -4,15 +4,26 @@
#include "net/base/ssl_client_auth_cache.h"
+#include "base/logging.h"
+#include "net/base/x509_certificate.h"
+
namespace net {
SSLClientAuthCache::SSLClientAuthCache() {}
SSLClientAuthCache::~SSLClientAuthCache() {}
-X509Certificate* SSLClientAuthCache::Lookup(const std::string& server) {
+bool SSLClientAuthCache::Lookup(
+ const std::string& server,
+ scoped_refptr<X509Certificate>* certificate) {
+ DCHECK(certificate);
+
AuthCacheMap::iterator iter = cache_.find(server);
- return (iter == cache_.end()) ? NULL : iter->second;
+ if (iter == cache_.end())
+ return false;
+
+ *certificate = iter->second;
+ return true;
}
void SSLClientAuthCache::Add(const std::string& server,
« no previous file with comments | « net/base/ssl_client_auth_cache.h ('k') | net/base/ssl_client_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698