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

Unified Diff: net/cert/nss_cert_database.cc

Issue 1423333006: Adding User Certificate (.crt) Import to Certificate Manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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
« no previous file with comments | « net/cert/nss_cert_database.h ('k') | net/third_party/mozilla_security_manager/nsNSSCertificateDB.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/nss_cert_database.cc
diff --git a/net/cert/nss_cert_database.cc b/net/cert/nss_cert_database.cc
index c9f013324a87958a0a19ea9c57113a1e6f2406ca..3bfb4a59ea10e06e198dc8d1c8f6ca348a8f604c 100644
--- a/net/cert/nss_cert_database.cc
+++ b/net/cert/nss_cert_database.cc
@@ -227,6 +227,18 @@ X509Certificate* NSSCertDatabase::FindRootInList(
return cert0;
}
+int NSSCertDatabase::ImportUserCert(const std::string& data) {
+ CertificateList certificates =
+ X509Certificate::CreateCertificateListFromBytes(
+ data.c_str(), data.size(), net::X509Certificate::FORMAT_AUTO);
+ int result = psm::ImportUserCert(certificates);
+
+ if (result == OK)
+ NotifyObserversOfCertAdded(NULL);
+
+ return result;
+}
+
bool NSSCertDatabase::ImportCACerts(const CertificateList& certificates,
TrustBits trust_bits,
ImportCertFailureList* not_imported) {
« no previous file with comments | « net/cert/nss_cert_database.h ('k') | net/third_party/mozilla_security_manager/nsNSSCertificateDB.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698