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); |