AU: detect failure when using public key verification
This makes public key verification non-fatal. A future CL will use
this knowledge to report statistics.
Change-Id: I9440155dd71621662e5c0f4011b3001bbc65e6d7
BUG=chromium-os:13341
TEST=unittests
Review URL: http://codereview.chromium.org/6778029
diff --git a/delta_performer.h b/delta_performer.h
index 7cc1d9b..a80e180 100644
--- a/delta_performer.h
+++ b/delta_performer.h
@@ -67,9 +67,12 @@
// is unavailable; it returns false if the public key is available but the
// delta payload doesn't include a signature. If |public_key_path| is an empty
// string, uses the default public key path.
+ // If the signature check fails, *signature_failed will be set to true (if
+ // it's non-NULL); this will not cause the method to fail.
bool VerifyPayload(const std::string& public_key_path,
const std::string& update_check_response_hash,
- const uint64_t update_check_response_size);
+ const uint64_t update_check_response_size,
+ bool* signature_failed);
// Reads from the update manifest the expected sizes and hashes of the target
// kernel and rootfs partitions. These values can be used for applied update