Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" | 5 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1133 root_dict->GetListWithoutPathExpansion(onc::kCertificates, &certificates); | 1133 root_dict->GetListWithoutPathExpansion(onc::kCertificates, &certificates); |
| 1134 | 1134 |
| 1135 const base::ListValue* network_configs; | 1135 const base::ListValue* network_configs; |
| 1136 bool has_network_configurations = root_dict->GetListWithoutPathExpansion( | 1136 bool has_network_configurations = root_dict->GetListWithoutPathExpansion( |
| 1137 onc::kNetworkConfigurations, | 1137 onc::kNetworkConfigurations, |
| 1138 &network_configs); | 1138 &network_configs); |
| 1139 | 1139 |
| 1140 if (has_certificates) { | 1140 if (has_certificates) { |
| 1141 VLOG(2) << "ONC file has " << certificates->GetSize() << " certificates"; | 1141 VLOG(2) << "ONC file has " << certificates->GetSize() << " certificates"; |
| 1142 | 1142 |
| 1143 onc::CertificateImporter cert_importer(source, allow_web_trust_from_policy); | 1143 // Web trust is only granted to certificates imported for a managed user |
| 1144 // on a managed device. | |
| 1145 onc::CertificateImporter cert_importer( | |
| 1146 source == onc::ONC_SOURCE_USER_POLICY && | |
| 1147 allow_web_trust_from_policy); | |
|
Joao da Silva
2013/01/16 15:03:57
Web trust is also allowed for ONC_SOURCE_USER_IMPO
pneubeck (no reviews)
2013/01/16 15:18:04
Done.
| |
| 1144 if (cert_importer.ParseAndStoreCertificates(*certificates) != | 1148 if (cert_importer.ParseAndStoreCertificates(*certificates) != |
| 1145 onc::CertificateImporter::IMPORT_OK) { | 1149 onc::CertificateImporter::IMPORT_OK) { |
| 1146 LOG(ERROR) << "Cannot parse some of the certificates in the ONC from " | 1150 LOG(ERROR) << "Cannot parse some of the certificates in the ONC from " |
| 1147 << onc::GetSourceAsString(source); | 1151 << onc::GetSourceAsString(source); |
| 1148 success = false; | 1152 success = false; |
| 1149 } | 1153 } |
| 1150 } | 1154 } |
| 1151 | 1155 |
| 1152 std::set<std::string> removal_ids; | 1156 std::set<std::string> removal_ids; |
| 1153 std::set<std::string>& network_ids(network_source_map_[source]); | 1157 std::set<std::string>& network_ids(network_source_map_[source]); |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1782 GetTpmInfo(); | 1786 GetTpmInfo(); |
| 1783 return tpm_slot_; | 1787 return tpm_slot_; |
| 1784 } | 1788 } |
| 1785 | 1789 |
| 1786 const std::string& NetworkLibraryImplBase::GetTpmPin() { | 1790 const std::string& NetworkLibraryImplBase::GetTpmPin() { |
| 1787 GetTpmInfo(); | 1791 GetTpmInfo(); |
| 1788 return tpm_pin_; | 1792 return tpm_pin_; |
| 1789 } | 1793 } |
| 1790 | 1794 |
| 1791 } // namespace chromeos | 1795 } // namespace chromeos |
| OLD | NEW |