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

Unified Diff: chrome/browser/policy/policy_builder.h

Issue 12183017: Verify the signature on user cloud policy downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 10 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/policy/policy_builder.h
diff --git a/chrome/browser/policy/policy_builder.h b/chrome/browser/policy/policy_builder.h
index c52dbeb572bc68f296197c68a104f73d357c107c..d45f65e1f54ddc84e3862fbee4afc22a728ab480 100644
--- a/chrome/browser/policy/policy_builder.h
+++ b/chrome/browser/policy/policy_builder.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_POLICY_POLICY_BUILDER_H_
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -78,6 +79,12 @@ class PolicyBuilder {
// Returns a binary policy blob, i.e. an encoded PolicyFetchResponse.
std::string GetBlob();
+ // Writes the public key corresponding to |signing_key_| to |public_key|.
+ void GetPublicKey(std::vector<uint8>* public_key);
+
+ // Writes the public key corresponding to |new_signing_key_| to |public_key|.
+ void GetNewPublicKey(std::vector<uint8>* public_key);
+
// These return hard-coded testing keys. Don't use in production!
static scoped_ptr<crypto::RSAPrivateKey> CreateTestSigningKey();
static scoped_ptr<crypto::RSAPrivateKey> CreateTestNewSigningKey();

Powered by Google App Engine
This is Rietveld 408576698