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

Unified Diff: chrome/browser/chromeos/net/nss_cert_database_cros.h

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cert manager basics working Created 7 years, 2 months 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
Index: chrome/browser/chromeos/net/nss_cert_database_cros.h
diff --git a/chrome/browser/chromeos/net/nss_cert_database_cros.h b/chrome/browser/chromeos/net/nss_cert_database_cros.h
new file mode 100644
index 0000000000000000000000000000000000000000..494afb466ccf1de1293df78c843dd5015d72da10
--- /dev/null
+++ b/chrome/browser/chromeos/net/nss_cert_database_cros.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_
+#define CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_
+
+#include "chrome/browser/chromeos/net/profile_cert_filter.h"
+#include "crypto/scoped_nss_types.h"
+#include "net/cert/nss_cert_database.h"
+
+namespace net {
+class CryptoModule;
+typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList;
+class X509Certificate;
+typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
+}
+
+namespace chromeos {
+
+class NSSCertDatabaseCros : public net::NSSCertDatabase {
+ public:
+ NSSCertDatabaseCros(crypto::ScopedPK11Slot public_slot,
+ crypto::ScopedPK11Slot private_slot);
+ virtual ~NSSCertDatabaseCros();
+
+ // net::NSSCertDatabase implementation.
+ virtual void ListCerts(net::CertificateList* certs) OVERRIDE;
+ virtual void ListModules(net::CryptoModuleList* modules, bool need_rw) const
+ OVERRIDE;
+ // TODO(mattm): handle trust setting, deletion, etc correctly when certs exist
+ // in multiple slots.
+ // TODO(mattm): handle trust setting correctly for certs in read-only slots.
+
+ protected:
+ // net::NSSCertDatabase implementation.
+ virtual crypto::ScopedPK11Slot GetPublicSlot() const OVERRIDE;
+ virtual crypto::ScopedPK11Slot GetPrivateSlot() const OVERRIDE;
+
+ private:
+ crypto::ScopedPK11Slot public_slot_;
+ crypto::ScopedPK11Slot private_slot_;
+ ProfileCertFilter profile_cert_filter_;
+
+ DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseCros);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_
« no previous file with comments | « chrome/browser/chromeos/net/client_cert_store_cros.cc ('k') | chrome/browser/chromeos/net/nss_cert_database_cros.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698