summaryrefslogtreecommitdiff
path: root/action_processor.h
diff options
context:
space:
mode:
authorJay Srinivasan <jaysri@chromium.org>2012-09-24 11:56:24 -0700
committerGerrit <chrome-bot@google.com>2012-09-24 12:55:08 -0700
commitf4318709ff5bd808a5fb8dd360acd9b66253a24e (patch)
tree27f529596102e4707ba6935dea50e1c5a0a5e7e5 /action_processor.h
parent00f76b61fdc8f401ae93b2300f1cc9d62d932f30 (diff)
Support needed for generating metadata signature in paygen
The metadata is the first portion of a payload that contains the following: 1. magic string ("CrOS") 2. version number 3. length of the manifest protobuf 4. manifest protobuf itself <payload blobs begin here> <payload signature as the last blob> Currently we have a manifest signature which protects only #4 above. In this CL we're extending the scope of manifest signature to include the rest of the metadata (1-4). The reason we need to do this is to protect the version value in HTTP as we're going to use it in future to have the flexibility to change the protobuf format of the manifest. Besides this change, this CL also contains: 1. Renaming of manifest_size and manifest_signature to metadata_size and metadata_signature respectively to reflect the above change and keep consistent terminology throughout. Also it renames protobuf_offset and protobuf_length to manifest_offset and manifest_size to increase the contextual semantics of the protobuf. 2. Addition of a new command-line option --out_metadata_hash_file in delta_generator so that au_generate can use it in a subsequent CL to get the SHA256 hash of the payload metadata in order to get it signed with the signer. 3. Reusing LoadPayload in unit tests to get rid of some hardcoding. Also updated delta_performer to localize such hardcoded constants within that class and not have callers worry about those values. BUG=chromium-os:33603 TEST=Tested on ZGB. Reran existing unit tests. Change-Id: Iace5aebe8f7d054a0fa3a224a588ef52d85f510b Reviewed-on: https://gerrit.chromium.org/gerrit/33726 Commit-Ready: Jay Srinivasan <jaysri@chromium.org> Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org>
Diffstat (limited to 'action_processor.h')
-rw-r--r--action_processor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/action_processor.h b/action_processor.h
index 3c9c2621..4de4f844 100644
--- a/action_processor.h
+++ b/action_processor.h
@@ -45,12 +45,12 @@ enum ActionExitCode {
kActionCodeDownloadPayloadPubKeyVerificationError = 18,
kActionCodePostinstallBootedFromFirmwareB = 19,
kActionCodeDownloadStateInitializationError = 20,
- kActionCodeDownloadInvalidManifest = 21,
+ kActionCodeDownloadInvalidMetadataMagicString = 21,
kActionCodeDownloadSignatureMissingInManifest = 22,
kActionCodeDownloadManifestParseError = 23,
- kActionCodeDownloadManifestSignatureError = 24,
- kActionCodeDownloadManifestSignatureVerificationError = 25,
- kActionCodeDownloadManifestSignatureMismatch = 26,
+ kActionCodeDownloadMetadataSignatureError = 24,
+ kActionCodeDownloadMetadataSignatureVerificationError = 25,
+ kActionCodeDownloadMetadataSignatureMismatch = 26,
kActionCodeDownloadOperationHashVerificationError = 27,
kActionCodeDownloadOperationExecutionError = 28,
kActionCodeDownloadOperationHashMismatch = 29,