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

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

Issue 2453993004: Match server version of DM API proto. (Closed)
Patch Set: Style and comment fixes. Created 4 years, 2 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: components/policy/core/common/cloud/cloud_policy_validator.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_validator.cc b/components/policy/core/common/cloud/cloud_policy_validator.cc
index 27c69a22f085c159f52ae4c92dbfc74f7bfe19a4..ea5e0fa04659a12a5b7faebe871fd4c734d033e6 100644
--- a/components/policy/core/common/cloud/cloud_policy_validator.cc
+++ b/components/policy/core/common/cloud/cloud_policy_validator.cc
@@ -262,8 +262,8 @@ void CloudPolicyValidatorBase::RunChecks() {
}
}
-// Verifies the |new_public_key_verification_signature| for the |new_public_key|
-// in the policy blob.
+// Verifies the |new_public_key_verification_signature_deprecated| for the
+// |new_public_key| in the policy blob.
bool CloudPolicyValidatorBase::CheckNewPublicKeyVerificationSignature() {
// If there's no local verification key, then just return true (no
// validation possible).
@@ -274,7 +274,7 @@ bool CloudPolicyValidatorBase::CheckNewPublicKeyVerificationSignature() {
return true;
}
- if (!policy_->has_new_public_key_verification_signature()) {
+ if (!policy_->has_new_public_key_verification_signature_deprecated()) {
// Policy does not contain a verification signature, so log an error.
LOG(ERROR) << "Policy is missing public_key_verification_signature";
UMA_HISTOGRAM_ENUMERATION(kMetricPolicyKeyVerification,
@@ -286,7 +286,7 @@ bool CloudPolicyValidatorBase::CheckNewPublicKeyVerificationSignature() {
if (!CheckVerificationKeySignature(
policy_->new_public_key(),
verification_key_,
- policy_->new_public_key_verification_signature())) {
+ policy_->new_public_key_verification_signature_deprecated())) {
LOG(ERROR) << "Signature verification failed";
UMA_HISTOGRAM_ENUMERATION(kMetricPolicyKeyVerification,
METRIC_POLICY_KEY_VERIFICATION_FAILED,
@@ -306,7 +306,7 @@ bool CloudPolicyValidatorBase::CheckVerificationKeySignature(
const std::string& verification_key,
const std::string& signature) {
DCHECK(!verification_key.empty());
- em::PolicyPublicKeyAndDomain signed_data;
+ em::DEPRECATEDPolicyPublicKeyAndDomain signed_data;
signed_data.set_new_public_key(key);
// If no owning_domain_ supplied, try extracting the domain from the policy

Powered by Google App Engine
This is Rietveld 408576698