| 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 "chromeos/network/onc/onc_utils.h" | 5 #include "chromeos/network/onc/onc_utils.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 556 |
| 557 // Only resolve |key_guid_ref| if |key_guid_refs| isn't present. | 557 // Only resolve |key_guid_ref| if |key_guid_refs| isn't present. |
| 558 return ResolveSingleCertRefToList( | 558 return ResolveSingleCertRefToList( |
| 559 certs_by_guid, key_guid_ref, key_pem_list, onc_object); | 559 certs_by_guid, key_guid_ref, key_pem_list, onc_object); |
| 560 } | 560 } |
| 561 | 561 |
| 562 bool ResolveServerCertRefsInObject(const CertPEMsByGUIDMap& certs_by_guid, | 562 bool ResolveServerCertRefsInObject(const CertPEMsByGUIDMap& certs_by_guid, |
| 563 const OncValueSignature& signature, | 563 const OncValueSignature& signature, |
| 564 base::DictionaryValue* onc_object) { | 564 base::DictionaryValue* onc_object) { |
| 565 if (&signature == &kCertificatePatternSignature) { | 565 if (&signature == &kCertificatePatternSignature) { |
| 566 if (!ResolveCertRefList(certs_by_guid, certificate::kIssuerCARef, | 566 if (!ResolveCertRefList(certs_by_guid, |
| 567 certificate::kIssuerCAPEMs, onc_object)) { | 567 client_cert::kIssuerCARef, |
| 568 client_cert::kIssuerCAPEMs, |
| 569 onc_object)) { |
| 568 return false; | 570 return false; |
| 569 } | 571 } |
| 570 } else if (&signature == &kEAPSignature) { | 572 } else if (&signature == &kEAPSignature) { |
| 571 if (!ResolveCertRefsOrRefToList(certs_by_guid, | 573 if (!ResolveCertRefsOrRefToList(certs_by_guid, |
| 572 eap::kServerCARefs, | 574 eap::kServerCARefs, |
| 573 eap::kServerCARef, | 575 eap::kServerCARef, |
| 574 eap::kServerCAPEMs, | 576 eap::kServerCAPEMs, |
| 575 onc_object)) { | 577 onc_object)) { |
| 576 return false; | 578 return false; |
| 577 } | 579 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 if (type == ::onc::network_type::kWimax) | 667 if (type == ::onc::network_type::kWimax) |
| 666 return NetworkTypePattern::Wimax(); | 668 return NetworkTypePattern::Wimax(); |
| 667 if (type == ::onc::network_type::kWireless) | 669 if (type == ::onc::network_type::kWireless) |
| 668 return NetworkTypePattern::Wireless(); | 670 return NetworkTypePattern::Wireless(); |
| 669 NOTREACHED(); | 671 NOTREACHED(); |
| 670 return NetworkTypePattern::Default(); | 672 return NetworkTypePattern::Default(); |
| 671 } | 673 } |
| 672 | 674 |
| 673 } // namespace onc | 675 } // namespace onc |
| 674 } // namespace chromeos | 676 } // namespace chromeos |
| OLD | NEW |