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

Unified Diff: net/base/ssl_client_auth_cache.h

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 | « no previous file | net/base/ssl_client_auth_cache.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.h
diff --git a/net/base/ssl_client_auth_cache.h b/net/base/ssl_client_auth_cache.h
index 023480b2915c562872a568df88ae798324c15d4c..2b276a220165d634ed59f32846254b9fea06ae3a 100644
--- a/net/base/ssl_client_auth_cache.h
+++ b/net/base/ssl_client_auth_cache.h
@@ -10,10 +10,11 @@
#include <map>
#include "base/ref_counted.h"
-#include "net/base/x509_certificate.h"
namespace net {
+class X509Certificate;
+
// The SSLClientAuthCache class is a simple cache structure to store SSL
// client certificates. Provides lookup, insertion, and deletion of entries.
// The parameter for doing lookups, insertions, and deletions is the server's
@@ -26,13 +27,18 @@ class SSLClientAuthCache {
SSLClientAuthCache();
~SSLClientAuthCache();
- // Check if we have a client certificate for SSL server at |server|.
- // Returns the client certificate (if found) or NULL (if not found).
- X509Certificate* Lookup(const std::string& server);
+ // Checks for a client certificate preference for SSL server at |server|.
+ // Returns true if a preference is found, and sets |*certificate| to the
+ // desired client certificate. The desired certificate may be NULL, which
+ // indicates a preference to not send any certificate to |server|.
+ // If a certificate preference is not found, returns false.
+ bool Lookup(const std::string& server,
+ scoped_refptr<X509Certificate>* certificate);
// Add a client certificate for |server| to the cache. If there is already
- // a client certificate for |server|, it will be overwritten. Both parameters
- // are IN only.
+ // 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 std::string& server, X509Certificate* client_cert);
// Remove the client certificate for |server| from the cache, if one exists.
« no previous file with comments | « no previous file | net/base/ssl_client_auth_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698