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

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

Issue 11970012: Add a check for server and CA certificates in device policies to the ONC validator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed the wording in the spec. Created 7 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
Index: chrome/browser/chromeos/cros/network_library_impl_base.cc
diff --git a/chrome/browser/chromeos/cros/network_library_impl_base.cc b/chrome/browser/chromeos/cros/network_library_impl_base.cc
index 87058dd2df08bcc2767be55af49cd333b8143b1c..ede50904052239a33fef20d51f29fc050136f085 100644
--- a/chrome/browser/chromeos/cros/network_library_impl_base.cc
+++ b/chrome/browser/chromeos/cros/network_library_impl_base.cc
@@ -1140,7 +1140,12 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
if (has_certificates) {
VLOG(2) << "ONC file has " << certificates->GetSize() << " certificates";
- onc::CertificateImporter cert_importer(source, allow_web_trust_from_policy);
+ // Web trust is only granted to certificates imported for a managed user
+ // on a managed device and for user imports.
+ bool allow_web_trust =
+ (source == onc::ONC_SOURCE_USER_IMPORT) ||
+ (source == onc::ONC_SOURCE_USER_POLICY && allow_web_trust_from_policy);
+ onc::CertificateImporter cert_importer(allow_web_trust);
if (cert_importer.ParseAndStoreCertificates(*certificates) !=
onc::CertificateImporter::IMPORT_OK) {
LOG(ERROR) << "Cannot parse some of the certificates in the ONC from "

Powered by Google App Engine
This is Rietveld 408576698