Chromium Code Reviews| Index: chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc |
| diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc b/chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc |
| index 41a998699e25b29d85023c347ab252eda94190bf..d814f4bb39fa3f01b4a4c447da8ab46c5959eb22 100644 |
| --- a/chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc |
| +++ b/chrome/browser/chromeos/policy/network_configuration_updater_impl_cros.cc |
| @@ -165,11 +165,30 @@ void NetworkConfigurationUpdaterImplCros::ApplyNetworkConfiguration( |
| ParseAndValidateOncForImport( |
| onc_blob, onc_source, "", &network_configs, &certificates); |
| - network_library_->LoadOncNetworks(network_configs, onc_source); |
| - |
| + chromeos::CertificateHandler::CertsByGUID imported_server_and_ca_certs; |
| scoped_ptr<net::CertificateList> web_trust_certs(new net::CertificateList); |
| certificate_handler_->ImportCertificates( |
| - certificates, onc_source, web_trust_certs.get()); |
| + certificates, onc_source, web_trust_certs.get(), |
| + &imported_server_and_ca_certs); |
| + |
| + if (!chromeos::onc::ResolveServerCertRefsInNetworks( |
| + imported_server_and_ca_certs, &network_configs)) { |
| + LOG(ERROR) << "Some certificate references in the ONC policy for source " |
| + << chromeos::onc::GetSourceAsString(onc_source) |
| + << " could not be resolved."; |
| + } |
| + |
| + net::CertificateList imported_server_and_ca_certs_list; |
| + for (chromeos::CertificateHandler::CertsByGUID::iterator it = |
| + imported_server_and_ca_certs.begin(); |
| + it != imported_server_and_ca_certs.end(); ++it) { |
| + imported_server_and_ca_certs_list.push_back(it->second); |
| + } |
| + network_library_->LoadOncNetworks( |
| + network_configs, |
| + onc_source, |
| + base::Bind(&chromeos::onc::GetPEMEncodedCertFromFingerprint, |
| + imported_server_and_ca_certs_list)); |
|
stevenjb
2013/06/21 22:47:13
This feels awkward. Do we really need to abstract
pneubeck (no reviews)
2013/06/24 08:12:31
This way it's easier to test the Translator and Lo
stevenjb
2013/06/27 17:23:31
I looked at this more closely, and I still don't l
|
| if (onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY) |
| SetTrustAnchors(web_trust_certs.Pass()); |