Index: chrome/common/extensions/extension.h |
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h |
index 245d7b66213a91871c8d45c858779d4ba5405b6b..9a5bfbf2ca729c998acd840e469e210c5c965b22 100644 |
--- a/chrome/common/extensions/extension.h |
+++ b/chrome/common/extensions/extension.h |
@@ -48,6 +48,7 @@ class Extension { |
static const char kManifestFilename[]; |
// Keys used in JSON representation of extensions. |
+ static const wchar_t* kBackgroundKey; |
static const wchar_t* kContentScriptsKey; |
static const wchar_t* kCssKey; |
static const wchar_t* kDescriptionKey; |
@@ -61,8 +62,8 @@ class Extension { |
static const wchar_t* kPluginsKey; |
static const wchar_t* kPluginsPathKey; |
static const wchar_t* kPluginsPublicKey; |
- |
- static const wchar_t* kBackgroundKey; |
+ static const wchar_t* kPublicKeyKey; |
+ static const wchar_t* kSignatureKey; |
static const wchar_t* kRunAtKey; |
static const wchar_t* kThemeKey; |
static const wchar_t* kThemeImagesKey; |
@@ -73,7 +74,6 @@ class Extension { |
static const wchar_t* kTooltipKey; |
static const wchar_t* kTypeKey; |
static const wchar_t* kVersionKey; |
- static const wchar_t* kZipHashKey; |
// Some values expected in manifests. |
static const char* kRunAtDocumentStartValue; |
@@ -164,6 +164,20 @@ class Extension { |
return GetResourcePath(path(), relative_path); |
} |
+ // |input| is expected to be the text of an rsa public or private key. It |
+ // tolerates the presence or absence of bracking header/footer like this: |
+ // -----(BEGIN|END) [RSA PUBLIC/PRIVATE] KEY----- |
+ // and may contain newlines. |
+ static bool ParsePEMKeyBytes(const std::string& input, std::string* output); |
+ |
+ // Does a simple base64 encoding of |input| into |output|. |
+ static bool ProducePEM(const std::string& input, std::string* output); |
+ |
+ // Expects base64 encoded |input| and formats into |output| including |
+ // the appropriate header & footer. |
+ static bool FormatPEMForFileOutput(const std::string input, |
+ std::string* output, bool is_public); |
+ |
// Initialize the extension from a parsed manifest. |
// If |require_id| is true, will return an error if the "id" key is missing |
// from the value. |