OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |
| 7 |
| 8 #include "chrome/browser/chromeos/net/profile_cert_filter.h" |
| 9 #include "crypto/scoped_nss_types.h" |
| 10 #include "net/cert/nss_cert_database.h" |
| 11 |
| 12 namespace net { |
| 13 class CryptoModule; |
| 14 typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList; |
| 15 class X509Certificate; |
| 16 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; |
| 17 } |
| 18 |
| 19 namespace chromeos { |
| 20 |
| 21 class NSSCertDatabaseCros : public net::NSSCertDatabase { |
| 22 public: |
| 23 NSSCertDatabaseCros(crypto::ScopedPK11Slot public_slot, |
| 24 crypto::ScopedPK11Slot private_slot); |
| 25 virtual ~NSSCertDatabaseCros(); |
| 26 |
| 27 // net::NSSCertDatabase implementation. |
| 28 virtual void ListCerts(net::CertificateList* certs) OVERRIDE; |
| 29 virtual void ListModules(net::CryptoModuleList* modules, bool need_rw) const |
| 30 OVERRIDE; |
| 31 // TODO(mattm): handle trust setting, deletion, etc correctly when certs exist |
| 32 // in multiple slots. |
| 33 // TODO(mattm): handle trust setting correctly for certs in read-only slots. |
| 34 |
| 35 protected: |
| 36 // net::NSSCertDatabase implementation. |
| 37 virtual crypto::ScopedPK11Slot GetPublicSlot() const OVERRIDE; |
| 38 virtual crypto::ScopedPK11Slot GetPrivateSlot() const OVERRIDE; |
| 39 |
| 40 private: |
| 41 crypto::ScopedPK11Slot public_slot_; |
| 42 crypto::ScopedPK11Slot private_slot_; |
| 43 ProfileCertFilter profile_cert_filter_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseCros); |
| 46 }; |
| 47 |
| 48 } // namespace chromeos |
| 49 |
| 50 #endif // CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |
OLD | NEW |