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

Unified Diff: chromeos/network/onc/onc_certificate_importer_impl.h

Issue 148183013: Use per-user nssdb in onc certificate importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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: chromeos/network/onc/onc_certificate_importer_impl.h
diff --git a/chromeos/network/onc/onc_certificate_importer_impl.h b/chromeos/network/onc/onc_certificate_importer_impl.h
index 82db305fb7f0213458847744edc7837eff2051d7..72d8299fa9735c54197284276110eee96a0723c6 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl.h
+++ b/chromeos/network/onc/onc_certificate_importer_impl.h
@@ -46,6 +46,7 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter {
virtual bool ImportCertificates(
const base::ListValue& certificates,
::onc::ONCSource source,
+ net::NSSCertDatabase* target_nssdb,
net::CertificateList* onc_trusted_certificates) OVERRIDE;
// This implements ImportCertificates. Additionally, if
@@ -55,17 +56,20 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter {
bool ParseAndStoreCertificates(bool allow_trust_imports,
const base::ListValue& onc_certificates,
net::CertificateList* onc_trusted_certificates,
+ net::NSSCertDatabase* target_nssdb,
CertsByGUID* imported_server_and_ca_certs);
+ private:
// Lists the certificates that have the string |label| as their certificate
// nickname (exact match).
static void ListCertsWithNickname(const std::string& label,
- net::CertificateList* result);
+ net::CertificateList* result,
+ net::NSSCertDatabase* target_nssdb);
- private:
// Deletes any certificate that has the string |label| as its nickname (exact
// match).
- static bool DeleteCertAndKeyByNickname(const std::string& label);
+ static bool DeleteCertAndKeyByNickname(const std::string& label,
+ net::NSSCertDatabase* target_nssdb);
// Parses and stores/removes |certificate| in/from the certificate
// store. Returns true if the operation succeeded.
@@ -73,6 +77,7 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter {
bool allow_trust_imports,
const base::DictionaryValue& certificate,
net::CertificateList* onc_trusted_certificates,
+ net::NSSCertDatabase* target_nssdb,
CertsByGUID* imported_server_and_ca_certs);
// Imports the Server or CA certificate |certificate|. Web trust is only
@@ -85,10 +90,12 @@ class CHROMEOS_EXPORT CertificateImporterImpl : public CertificateImporter {
const std::string& guid,
const base::DictionaryValue& certificate,
net::CertificateList* onc_trusted_certificates,
+ net::NSSCertDatabase* target_nssdb,
CertsByGUID* imported_server_and_ca_certs);
bool ParseClientCertificate(const std::string& guid,
- const base::DictionaryValue& certificate);
+ const base::DictionaryValue& certificate,
+ net::NSSCertDatabase* target_nssdb);
DISALLOW_COPY_AND_ASSIGN(CertificateImporterImpl);
};

Powered by Google App Engine
This is Rietveld 408576698