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

Unified Diff: net/ssl/ssl_client_auth_cache.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: . Created 3 years, 7 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/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 bfc5ade12389931559e7550dacd6bbc0ec17e0bd..c1fce7838662c350a9adc051e26c5f985e539571 100644
--- a/net/ssl/ssl_client_auth_cache.cc
+++ b/net/ssl/ssl_client_auth_cache.cc
@@ -33,9 +33,10 @@ bool SSLClientAuthCache::Lookup(const HostPortPair& server,
}
void SSLClientAuthCache::Add(const HostPortPair& server,
- X509Certificate* certificate,
- SSLPrivateKey* private_key) {
- cache_[server] = std::make_pair(certificate, private_key);
+ scoped_refptr<X509Certificate> certificate,
+ scoped_refptr<SSLPrivateKey> private_key) {
+ cache_[server] =
+ std::make_pair(std::move(certificate), std::move(private_key));
// TODO(wtc): enforce a maximum number of entries.
}

Powered by Google App Engine
This is Rietveld 408576698