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

Unified Diff: payload_signer.h

Issue 6271003: AU: Support signed payload verification through the delta generator. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 9 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
« no previous file with comments | « omaha_hash_calculator.cc ('k') | payload_signer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: payload_signer.h
diff --git a/payload_signer.h b/payload_signer.h
index 5ebba19a7c7e4cae1210e76e7f4e72053df45e1c..eb0663d6969f374811784293a2eeb01255bbfb75 100644
--- a/payload_signer.h
+++ b/payload_signer.h
@@ -39,13 +39,6 @@ class PayloadSigner {
static bool SignatureBlobLength(const std::string& private_key_path,
uint64_t* out_length);
- // Returns false if the payload signature can't be verified. Returns true
- // otherwise and sets |out_hash| to the signed payload hash.
- static bool VerifySignature(const std::vector<char>& signature_blob,
- const std::string& public_key_path,
- std::vector<char>* out_hash_data);
-
-
// Given an unsigned payload in |payload_path| (with no dummy signature op)
// and the raw |signature_size| calculates the raw hash that needs to be
// signed in |out_hash_data|. Returns true on success, false otherwise.
@@ -62,6 +55,18 @@ class PayloadSigner {
const std::vector<char>& signature,
const std::string& signed_payload_path);
+ // Returns false if the payload signature can't be verified. Returns true
+ // otherwise and sets |out_hash| to the signed payload hash.
+ static bool VerifySignature(const std::vector<char>& signature_blob,
+ const std::string& public_key_path,
+ std::vector<char>* out_hash_data);
+
+ // Returns true if the payload in |payload_path| is signed and its hash can be
+ // verified using the public key in |public_key_path|. Returns false
+ // otherwise.
+ static bool VerifySignedPayload(const std::string& payload_path,
+ const std::string& public_key_path);
+
private:
// This should never be constructed
DISALLOW_IMPLICIT_CONSTRUCTORS(PayloadSigner);
« no previous file with comments | « omaha_hash_calculator.cc ('k') | payload_signer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698