OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chromeos/network/client_cert_resolver.h" | 5 #include "chromeos/network/client_cert_resolver.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <certt.h> // for (SECCertUsageEnum) certUsageAnyCA | 8 #include <certt.h> // for (SECCertUsageEnum) certUsageAnyCA |
9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
10 | 10 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 | 327 |
328 // Filter networks with ClientCertPattern. As ClientCertPatterns can only be | 328 // Filter networks with ClientCertPattern. As ClientCertPatterns can only be |
329 // set by policy, we check there. | 329 // set by policy, we check there. |
330 for (NetworkStateHandler::NetworkStateList::const_iterator it = | 330 for (NetworkStateHandler::NetworkStateList::const_iterator it = |
331 networks.begin(); it != networks.end(); ++it) { | 331 networks.begin(); it != networks.end(); ++it) { |
332 const NetworkState* network = *it; | 332 const NetworkState* network = *it; |
333 | 333 |
334 // In any case, don't check this network again in NetworkListChanged. | 334 // In any case, don't check this network again in NetworkListChanged. |
335 resolved_networks_.insert(network->path()); | 335 resolved_networks_.insert(network->path()); |
336 | 336 |
337 // If this network is not managed, it cannot have a ClientCertPattern. | 337 // If this network is not configured, it cannot have a ClientCertPattern. |
stevenjb
2014/07/11 21:13:56
It doesn't look like we really need to check wheth
pneubeck (no reviews)
2014/07/12 09:07:10
Right. This was an efficient test for the presence
| |
338 if (network->guid().empty()) | 338 if (network->profile_path().empty()) |
339 continue; | 339 continue; |
340 | 340 |
341 if (network->profile_path().empty()) { | |
342 LOG(ERROR) << "Network " << network->path() | |
343 << " has a GUID but not profile path"; | |
344 continue; | |
345 } | |
346 const base::DictionaryValue* policy = | 341 const base::DictionaryValue* policy = |
347 managed_network_config_handler_->FindPolicyByGuidAndProfile( | 342 managed_network_config_handler_->FindPolicyByGuidAndProfile( |
348 network->guid(), network->profile_path()); | 343 network->guid(), network->profile_path()); |
349 | 344 |
350 if (!policy) { | 345 if (!policy) { |
351 VLOG(1) << "The policy for network " << network->path() << " with GUID " | 346 VLOG(1) << "The policy for network " << network->path() << " with GUID " |
352 << network->guid() << " is not available yet."; | 347 << network->guid() << " is not available yet."; |
353 // Skip this network for now. Once the policy is loaded, PolicyApplied() | 348 // Skip this network for now. Once the policy is loaded, PolicyApplied() |
354 // will retry. | 349 // will retry. |
355 continue; | 350 continue; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 DBusThreadManager::Get()->GetShillServiceClient()-> | 398 DBusThreadManager::Get()->GetShillServiceClient()-> |
404 SetProperties(dbus::ObjectPath(it->service_path), | 399 SetProperties(dbus::ObjectPath(it->service_path), |
405 shill_properties, | 400 shill_properties, |
406 base::Bind(&base::DoNothing), | 401 base::Bind(&base::DoNothing), |
407 base::Bind(&LogError, it->service_path)); | 402 base::Bind(&LogError, it->service_path)); |
408 network_state_handler_->RequestUpdateForNetwork(it->service_path); | 403 network_state_handler_->RequestUpdateForNetwork(it->service_path); |
409 } | 404 } |
410 } | 405 } |
411 | 406 |
412 } // namespace chromeos | 407 } // namespace chromeos |
OLD | NEW |