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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_policy_store.cc

Issue 2153613003: Revert of Added policy device id validation similar to the existing DM token validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/policy/core/browser/cloud/message_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/device_local_account_policy_store.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_store.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 policy(), 162 policy(),
163 valid_timestamp_required 163 valid_timestamp_required
164 ? CloudPolicyValidatorBase::TIMESTAMP_REQUIRED 164 ? CloudPolicyValidatorBase::TIMESTAMP_REQUIRED
165 : CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED, 165 : CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED,
166 CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED); 166 CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED);
167 167
168 // Validate the DMToken to match what device policy has. 168 // Validate the DMToken to match what device policy has.
169 validator->ValidateDMToken(device_policy_data->request_token(), 169 validator->ValidateDMToken(device_policy_data->request_token(),
170 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED); 170 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED);
171 171
172 // Validate the device id to match what device policy has.
173 validator->ValidateDeviceId(device_policy_data->device_id());
174
175 validator->ValidatePayload(); 172 validator->ValidatePayload();
176 policy::BrowserPolicyConnectorChromeOS* connector = 173 policy::BrowserPolicyConnectorChromeOS* connector =
177 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 174 g_browser_process->platform_part()->browser_policy_connector_chromeos();
178 validator->ValidateSignature(key->as_string(), 175 validator->ValidateSignature(key->as_string(),
179 GetPolicyVerificationKey(), 176 GetPolicyVerificationKey(),
180 connector->GetEnterpriseDomain(), 177 connector->GetEnterpriseDomain(),
181 false); 178 false);
182 validator.release()->StartValidation(callback); 179 validator.release()->StartValidation(callback);
183 } 180 }
184 181
185 } // namespace policy 182 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/browser/cloud/message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698