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

Unified Diff: chromeos/network/onc/onc_utils.cc

Issue 11469026: Extending ONC validator's logging. Completing toplevel validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@add_error_handling_to_validator
Patch Set: Rebased. Created 8 years 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
« no previous file with comments | « chromeos/network/onc/onc_utils.h ('k') | chromeos/network/onc/onc_validator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_utils.cc
diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc
index 62e0d4682ace119565c61e0be4b9eba297f7a1ec..85cfe640d90e068d5fc9e790ba03631b2cce55d7 100644
--- a/chromeos/network/onc/onc_utils.cc
+++ b/chromeos/network/onc/onc_utils.cc
@@ -27,6 +27,10 @@ const char kUnableToDecode[] = "Unable to decode encrypted ONC";
} // namespace
+const char kEmptyUnencryptedConfiguration[] =
+ "{\"Type\":\"UnencryptedConfiguration\",\"NetworkConfigurations\":[],"
+ "\"Certificates\":[]}";
+
scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
const std::string& json) {
std::string error;
@@ -64,7 +68,7 @@ scoped_ptr<base::DictionaryValue> Decrypt(const std::string& passphrase,
!root.GetInteger(encrypted::kIterations, &iterations) ||
!root.GetString(encrypted::kSalt, &salt) ||
!root.GetString(encrypted::kStretch, &stretch_method) ||
- !root.GetString(encrypted::kType, &onc_type) ||
+ !root.GetString(kType, &onc_type) ||
onc_type != kEncryptedConfiguration) {
ONC_LOG_ERROR("Encrypted ONC malformed.");
« no previous file with comments | « chromeos/network/onc/onc_utils.h ('k') | chromeos/network/onc/onc_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698