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

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

Issue 10868113: Disable certificate patterns for device policy ONC files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes Created 8 years, 3 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 86083ee84340bd60b8516ca03080346dc216b816..5207fc5914ef9412bd60552c16c86740d187b9ef 100644
--- a/chrome/browser/chromeos/cros/onc_network_parser.cc
+++ b/chrome/browser/chromeos/cros/onc_network_parser.cc
@@ -1379,6 +1379,11 @@ bool OncNetworkParser::ParseClientCertPattern(OncNetworkParser* parser,
PropertyIndex index,
const base::Value& value,
Network* network) {
+ // Ignore certificate patterns for device policy ONC so that an unmanaged user
+ // won't have a certificate presented for them involuntarily.
+ if (parser->onc_source() == NetworkUIData::ONC_SOURCE_DEVICE_POLICY)
+ return false;
+
// Only WiFi and VPN have this type.
if (network->type() != TYPE_WIFI &&
network->type() != TYPE_VPN) {
@@ -1387,6 +1392,7 @@ bool OncNetworkParser::ParseClientCertPattern(OncNetworkParser* parser,
return false;
}
+
switch (index) {
case PROPERTY_INDEX_ONC_CERTIFICATE_PATTERN_ENROLLMENT_URI: {
std::vector<std::string> resulting_list;
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.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