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

Unified Diff: net/ssl/ssl_client_auth_cache.h

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/client_key_store.cc ('k') | net/ssl/ssl_client_auth_cache.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.h
diff --git a/net/ssl/ssl_client_auth_cache.h b/net/ssl/ssl_client_auth_cache.h
index 53d5312a9ee04cba115803258b9619b5ce1f6f5a..276fd37757fcfb0c5079255afee0f16216d3d033 100644
--- a/net/ssl/ssl_client_auth_cache.h
+++ b/net/ssl/ssl_client_auth_cache.h
@@ -7,12 +7,14 @@
#include <map>
#include <string>
+#include <utility>
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_export.h"
#include "net/cert/cert_database.h"
+#include "net/ssl/ssl_private_key.h"
namespace net {
@@ -36,13 +38,16 @@ class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
// indicates a preference to not send any certificate to |server|.
// If a certificate preference is not found, returns false.
bool Lookup(const HostPortPair& server,
- scoped_refptr<X509Certificate>* certificate);
+ scoped_refptr<X509Certificate>* certificate,
+ scoped_refptr<SSLPrivateKey>* private_key);
- // Add a client certificate for |server| to the cache. If there is already
- // a client certificate for |server|, it will be overwritten. A NULL
- // |client_cert| indicates a preference that no client certificate should
- // be sent to |server|.
- void Add(const HostPortPair& server, X509Certificate* client_cert);
+ // Add a client certificate and private key for |server| to the cache. If
+ // there is already a client certificate for |server|, it will be
+ // overwritten. A NULL |client_cert| indicates a preference that no client
+ // certificate should be sent to |server|.
+ void Add(const HostPortPair& server,
+ X509Certificate* client_cert,
+ SSLPrivateKey* private_key);
// Remove the client certificate for |server| from the cache, if one exists.
void Remove(const HostPortPair& server);
@@ -52,7 +57,8 @@ class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
private:
typedef HostPortPair AuthCacheKey;
- typedef scoped_refptr<X509Certificate> AuthCacheValue;
+ typedef std::pair<scoped_refptr<X509Certificate>,
+ scoped_refptr<SSLPrivateKey>> AuthCacheValue;
typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap;
// internal representation of cache, an STL map.
« no previous file with comments | « net/ssl/client_key_store.cc ('k') | net/ssl/ssl_client_auth_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698