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

Unified Diff: components/policy/core/common/cloud/cloud_policy_validator_unittest.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
Index: components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
index e0a7f980d3c6f9792e7ad7e3cc14bacc308761fc..23f4f5dd9b132882a35e85f4efb8383b0362e7a1 100644
--- a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
+++ b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
@@ -107,12 +107,13 @@ class CloudPolicyValidatorTest : public testing::Test {
cached_key_signature_,
GetPolicyVerificationKey(),
owning_domain_);
- validator->ValidateSignature(public_key,
- GetPolicyVerificationKey(),
- owning_domain_,
- allow_key_rotation_);
- if (allow_key_rotation_)
+ if (allow_key_rotation_) {
+ validator->ValidateSignatureAllowingRotation(
+ public_key, GetPolicyVerificationKey(), owning_domain_);
validator->ValidateInitialKey(GetPolicyVerificationKey(), owning_domain_);
+ } else {
+ validator->ValidateSignature(public_key);
+ }
return base::WrapUnique(validator);
}

Powered by Google App Engine
This is Rietveld 408576698