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

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: Forgot about unittests 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') | net/http/http_network_transaction.cc » ('J')
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..1fc7b768dcdb706cfcaf007ca130f9f54ae7733d 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,9 +27,13 @@ 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);
+ // Check if we have a client certificate preference for SSL server at
+ // |server|. Returns true if a preference is found.
+ // If found, |*certificate| will point to the client certificate
+ // if the user has selected a certificate, or NULL if the user has opted to
+ // not provide a certificate.
+ // If a certificate preference is not found, |*certificate| will be NULL.
wtc 2010/11/18 01:33:07 This should say: If a certificate preference is
+ bool Lookup(const std::string& server, X509Certificate** certificate);
wtc 2010/11/18 01:33:07 Declare the output argument as scoped_refptr<X50
// Add a client certificate for |server| to the cache. If there is already
// a client certificate for |server|, it will be overwritten. Both parameters
« no previous file with comments | « no previous file | net/base/ssl_client_auth_cache.cc » ('j') | net/http/http_network_transaction.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698