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

Unified Diff: chrome/browser/chromeos/cros/onc_network_parser.cc

Issue 10458069: Reland: Fix imported server certs being distrusted in NSS 3.13. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the test failures Created 8 years, 7 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/cros/onc_network_parser.cc
diff --git a/chrome/browser/chromeos/cros/onc_network_parser.cc b/chrome/browser/chromeos/cros/onc_network_parser.cc
index 8919b76e9f7a25b6a5e8c841ac2d6b46e8907ea8..0193142f01591dd7e0813b54f8eb7f326e1dabf3 100644
--- a/chrome/browser/chromeos/cros/onc_network_parser.cc
+++ b/chrome/browser/chromeos/cros/onc_network_parser.cc
@@ -829,6 +829,8 @@ OncNetworkParser::ParseServerOrCaCertificate(
return NULL;
}
if (trust_type == "Web") {
+ // "Web" implies that the certificate is to be trusted for SSL
+ // identification.
web_trust = true;
} else {
LOG(WARNING) << "ONC File: certificate contains unknown "
@@ -929,12 +931,12 @@ OncNetworkParser::ParseServerOrCaCertificate(
cert_list.push_back(x509_cert);
net::CertDatabase::ImportCertFailureList failures;
bool success = false;
+ net::CertDatabase::TrustBits trust = web_trust ?
+ net::CertDatabase::TRUSTED_SSL :
+ net::CertDatabase::TRUST_DEFAULT;
if (cert_type == "Server") {
- success = cert_database.ImportServerCert(cert_list, &failures);
+ success = cert_database.ImportServerCert(cert_list, trust, &failures);
} else { // Authority cert
- net::CertDatabase::TrustBits trust = web_trust ?
- net::CertDatabase::TRUSTED_SSL :
- net::CertDatabase::UNTRUSTED;
success = cert_database.ImportCACerts(cert_list, trust, &failures);
}
if (!failures.empty()) {
« no previous file with comments | « chrome/browser/certificate_manager_model.cc ('k') | chrome/browser/chromeos/cros/onc_network_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698