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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc

Issue 116273002: Added support for signed policy blobs on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for ios. Created 6 years, 11 months 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
Index: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
index 16468bb595e62e91ed910a72f2f748c0c216225d..a4a2e99f171f6a1494f76cfacc23e8f00b6a93d9 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
@@ -46,7 +46,10 @@ void DeviceCloudPolicyStoreChromeOS::Store(
}
scoped_ptr<DeviceCloudPolicyValidator> validator(CreateValidator(policy));
- validator->ValidateSignature(*owner_key->public_key(), true);
+ validator->ValidateSignature(owner_key->public_key_as_string(),
+ GetPolicyVerificationKey(),
+ std::string(),
+ true);
validator->ValidateAgainstCurrentPolicy(
device_settings_service_->policy_data(),
CloudPolicyValidatorBase::TIMESTAMP_REQUIRED,
@@ -74,7 +77,7 @@ void DeviceCloudPolicyStoreChromeOS::InstallInitialPolicy(
}
scoped_ptr<DeviceCloudPolicyValidator> validator(CreateValidator(policy));
- validator->ValidateInitialKey();
+ validator->ValidateInitialKey(GetPolicyVerificationKey());
validator.release()->StartValidation(
base::Bind(&DeviceCloudPolicyStoreChromeOS::OnPolicyToStoreValidated,
weak_factory_.GetWeakPtr()));

Powered by Google App Engine
This is Rietveld 408576698