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

Unified Diff: net/ssl/client_cert_store_chromeos.h

Issue 663583006: Remove nss_util dependency from ClientCertStoreChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo. Created 6 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 | « chrome/chrome_browser_chromeos.gypi ('k') | net/ssl/client_cert_store_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/client_cert_store_chromeos.h
diff --git a/net/ssl/client_cert_store_chromeos.h b/net/ssl/client_cert_store_chromeos.h
index f14619ab1e5a6ec899986dc3137a36795741f1d3..5e9922daab4c73170a6e7151d7870d7d58ce8ff0 100644
--- a/net/ssl/client_cert_store_chromeos.h
+++ b/net/ssl/client_cert_store_chromeos.h
@@ -7,20 +7,36 @@
#include <string>
-#include "crypto/scoped_nss_types.h"
-#include "net/cert/nss_profile_filter_chromeos.h"
+#include "base/memory/scoped_ptr.h"
#include "net/ssl/client_cert_store_nss.h"
namespace net {
+class X509Certificate;
+
class NET_EXPORT ClientCertStoreChromeOS : public ClientCertStoreNSS {
public:
- // Constructs a ClientCertStore that will return client certs available on
- // the user's private and public slots. If |use_system_slot| is true, certs on
- // the system slot will also be returned.
+ class CertFilter {
+ public:
+ virtual ~CertFilter() {}
+
+ // Initializes this filter. Returns true if it finished initialization,
+ // otherwise returns false and calls |callback| once the initialization is
+ // completed.
+ // Must be called at most once.
+ virtual bool Init(const base::Closure& callback) = 0;
+
+ // Returns true if |cert| is allowed to be used as a client certificate
+ // (e.g. for a certain browser context or user).
+ // This is only called once initialization is finished, see Init().
+ virtual bool IsCertAllowed(
+ const scoped_refptr<X509Certificate>& cert) const = 0;
+ };
+
+ // This ClientCertStore will return only client certs that pass the filter
+ // |cert_filter|.
ClientCertStoreChromeOS(
- bool use_system_slot,
- const std::string& username_hash,
+ scoped_ptr<CertFilter> cert_filter,
const PasswordDelegateFactory& password_delegate_factory);
virtual ~ClientCertStoreChromeOS();
@@ -37,15 +53,11 @@ class NET_EXPORT ClientCertStoreChromeOS : public ClientCertStoreNSS {
CertificateList* selected_certs) override;
private:
- void DidGetSystemAndPrivateSlot(const SSLCertRequestInfo* request,
- CertificateList* selected_certs,
- const base::Closure& callback,
- crypto::ScopedPK11Slot system_slot,
- crypto::ScopedPK11Slot private_slot);
-
- bool use_system_slot_;
- std::string username_hash_;
- NSSProfileFilterChromeOS profile_filter_;
+ void CertFilterInitialized(const SSLCertRequestInfo* request,
+ CertificateList* selected_certs,
+ const base::Closure& callback);
+
+ scoped_ptr<CertFilter> cert_filter_;
DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS);
};
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | net/ssl/client_cert_store_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698