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

Unified Diff: components/policy/core/common/cloud/policy_builder.h

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: components/policy/core/common/cloud/policy_builder.h
diff --git a/components/policy/core/common/cloud/policy_builder.h b/components/policy/core/common/cloud/policy_builder.h
index 2298b3aebe2e794f8fbdfd2865a9572478c15909..20114c6fc7f307bfc344697299be618299c185e6 100644
--- a/components/policy/core/common/cloud/policy_builder.h
+++ b/components/policy/core/common/cloud/policy_builder.h
@@ -61,6 +61,11 @@ class PolicyBuilder {
void SetDefaultSigningKey();
void UnsetSigningKey();
+ // Sets the default initial signing key - the resulting policy will be signed
+ // by the default signing key, and will have that key set as the
+ // new_public_key field, as if it were an initial key provision.
+ void SetDefaultInitialSigningKey();
+
scoped_ptr<crypto::RSAPrivateKey> GetNewSigningKey();
void SetDefaultNewSigningKey();
void UnsetNewSigningKey();
@@ -79,6 +84,11 @@ class PolicyBuilder {
static scoped_ptr<crypto::RSAPrivateKey> CreateTestSigningKey();
static scoped_ptr<crypto::RSAPrivateKey> CreateTestOtherSigningKey();
+ // Verification signatures for the two hard-coded testing keys above. These
+ // signatures are valid only for the kFakeDomain domain.
+ static std::string GetTestSigningKeySignature();
+ static std::string GetTestOtherSigningKeySignature();
+
private:
// Produces |key|'s signature over |data| and stores it in |signature|.
void SignData(const std::string& data,

Powered by Google App Engine
This is Rietveld 408576698