OLD | NEW |
---|---|
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/settings/session_manager_operation.h" | 5 #include "chrome/browser/chromeos/settings/session_manager_operation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 // To prevent all of these issues the timestamp is just not verified when | 175 // To prevent all of these issues the timestamp is just not verified when |
176 // loading the device policy from the cache. Note that the timestamp is still | 176 // loading the device policy from the cache. Note that the timestamp is still |
177 // verified during enrollment and when a new policy is fetched from the | 177 // verified during enrollment and when a new policy is fetched from the |
178 // server. | 178 // server. |
179 validator->ValidateAgainstCurrentPolicy( | 179 validator->ValidateAgainstCurrentPolicy( |
180 policy_data_.get(), | 180 policy_data_.get(), |
181 policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED, | 181 policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED, |
182 policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED); | 182 policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED); |
183 validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType); | 183 validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType); |
184 validator->ValidatePayload(); | 184 validator->ValidatePayload(); |
185 // We don't check the DMServer verification key below, because the signing | |
186 // key is validated when it is installed. | |
palmer
2014/02/14 21:52:48
What is the harm of checking it again?
Andrew T Wilson (Slow)
2014/02/17 17:28:40
None, really - I've also spoken with mnissler abou
| |
185 validator->ValidateSignature(owner_key_->public_key_as_string(), | 187 validator->ValidateSignature(owner_key_->public_key_as_string(), |
186 policy::GetPolicyVerificationKey(), | 188 std::string(), // No key validation check. |
187 std::string(), | 189 std::string(), |
188 false); | 190 false); |
189 validator->StartValidation( | 191 validator->StartValidation( |
190 base::Bind(&SessionManagerOperation::ReportValidatorStatus, | 192 base::Bind(&SessionManagerOperation::ReportValidatorStatus, |
191 weak_factory_.GetWeakPtr())); | 193 weak_factory_.GetWeakPtr())); |
192 } | 194 } |
193 | 195 |
194 void SessionManagerOperation::ReportValidatorStatus( | 196 void SessionManagerOperation::ReportValidatorStatus( |
195 policy::DeviceCloudPolicyValidator* validator) { | 197 policy::DeviceCloudPolicyValidator* validator) { |
196 DeviceSettingsService::Status status = | 198 DeviceSettingsService::Status status = |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 } | 330 } |
329 | 331 |
330 void SignAndStoreSettingsOperation::HandleStoreResult(bool success) { | 332 void SignAndStoreSettingsOperation::HandleStoreResult(bool success) { |
331 if (!success) | 333 if (!success) |
332 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED); | 334 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED); |
333 else | 335 else |
334 StartLoading(); | 336 StartLoading(); |
335 } | 337 } |
336 | 338 |
337 } // namespace chromeos | 339 } // namespace chromeos |
OLD | NEW |