| 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.
|
|
|