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

Unified Diff: chrome/browser/chromeos/settings/session_manager_operation_unittest.cc

Issue 116273002: Added support for signed policy blobs on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for ios. Created 6 years, 11 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: chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
diff --git a/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc b/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
index 980399c3fa415495ffed927ac6a1c53c2cde4c2b..40a434b86b8062e82609e97d40cf876230fb5f59 100644
--- a/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
+++ b/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
@@ -263,7 +263,16 @@ TEST_F(SessionManagerOperationTest, SignAndStoreSettings) {
validator->ValidatePayload();
std::vector<uint8> public_key;
policy_.GetSigningKey()->ExportPublicKey(&public_key);
- validator->ValidateSignature(public_key, false);
+ // Convert from bytes to string format (which is what ValidateSignature()
+ // takes).
+ std::string public_key_as_string = std::string(
+ reinterpret_cast<const char*>(vector_as_array(&public_key)),
+ public_key.size());
+ validator->ValidateSignature(
+ public_key_as_string,
+ policy::GetPolicyVerificationKey(),
+ policy::PolicyBuilder::GetTestSigningKeySignature(),
+ false);
validator->StartValidation(
base::Bind(&SessionManagerOperationTest::CheckSuccessfulValidation,
base::Unretained(this)));

Powered by Google App Engine
This is Rietveld 408576698