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

Unified Diff: net/ssl/ssl_client_auth_cache.cc

Issue 1422573008: Plumbing SSLPrivateKey (//net) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing un-needed forward decl. Created 5 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/ssl/ssl_client_auth_cache.h ('k') | net/ssl/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/ssl/ssl_client_auth_cache.cc
diff --git a/net/ssl/ssl_client_auth_cache.cc b/net/ssl/ssl_client_auth_cache.cc
index 4c6b0d82f153a95c6d8d5daf89e88f5a0160f0e9..ba60c1bc5feb1d62b08ad4fee82f02bdf229aa49 100644
--- a/net/ssl/ssl_client_auth_cache.cc
+++ b/net/ssl/ssl_client_auth_cache.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "net/cert/x509_certificate.h"
+#include "net/ssl/ssl_private_key.h"
namespace net {
@@ -17,22 +18,24 @@ SSLClientAuthCache::~SSLClientAuthCache() {
CertDatabase::GetInstance()->RemoveObserver(this);
}
-bool SSLClientAuthCache::Lookup(
- const HostPortPair& server,
- scoped_refptr<X509Certificate>* certificate) {
+bool SSLClientAuthCache::Lookup(const HostPortPair& server,
+ scoped_refptr<X509Certificate>* certificate,
+ scoped_refptr<SSLPrivateKey>* private_key) {
DCHECK(certificate);
AuthCacheMap::iterator iter = cache_.find(server);
if (iter == cache_.end())
return false;
- *certificate = iter->second;
+ *certificate = iter->second.first;
+ *private_key = iter->second.second;
return true;
}
void SSLClientAuthCache::Add(const HostPortPair& server,
- X509Certificate* value) {
- cache_[server] = value;
+ X509Certificate* certificate,
+ SSLPrivateKey* private_key) {
+ cache_[server] = std::make_pair(certificate, private_key);
// TODO(wtc): enforce a maximum number of entries.
}
« no previous file with comments | « net/ssl/ssl_client_auth_cache.h ('k') | net/ssl/ssl_client_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698