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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_store.cc

Issue 2494843002: Don't pass domain and verification key to validation when not required (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « components/policy/core/common/cloud/cloud_policy_validator_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/cloud/user_cloud_policy_store.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store.cc b/components/policy/core/common/cloud/user_cloud_policy_store.cc
index 615d9a69def649b863e35fb0765eba58e2943afc..017743c7118ee163dd50222dc2cb975e13abb5c7 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_store.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_store.cc
@@ -394,11 +394,7 @@ void UserCloudPolicyStore::Validate(
verification_key,
owning_domain);
// Loading from cache, so don't allow key rotation.
- const bool no_rotation = false;
- validator->ValidateSignature(cached_key->signing_key(),
- verification_key,
- owning_domain,
- no_rotation);
+ validator->ValidateSignature(cached_key->signing_key());
} else {
// No passed cached_key - this is not validating the initial policy load
// from cache, but rather an update from the server.
@@ -412,9 +408,8 @@ void UserCloudPolicyStore::Validate(
// rotation - the verification key will prevent invalid policy from being
// injected. |policy_key_| is already known to be valid, so no need to
// verify via ValidateCachedKey().
- const bool allow_rotation = true;
- validator->ValidateSignature(
- policy_key_, verification_key, owning_domain, allow_rotation);
+ validator->ValidateSignatureAllowingRotation(
+ policy_key_, verification_key, owning_domain);
}
}
« no previous file with comments | « components/policy/core/common/cloud/cloud_policy_validator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698