Verify hashes of source copy blocks at install time
In VABC, all copy ops are performed upfront without actually verifying
the hash. This CL adds the missing hash checks.
Test: th
Bug: 223471136
Change-Id: I1ec7ddee3122c9614484b2d8b7e9f38128428080
diff --git a/payload_consumer/partition_writer.h b/payload_consumer/partition_writer.h
index 89e5884..e620c47 100644
--- a/payload_consumer/partition_writer.h
+++ b/payload_consumer/partition_writer.h
@@ -46,6 +46,10 @@
const InstallOperation& operation,
const FileDescriptorPtr source_fd,
ErrorCode* error);
+ static bool ValidateSourceHash(const InstallOperation& operation,
+ const FileDescriptorPtr source_fd,
+ size_t block_size,
+ ErrorCode* error);
// Perform necessary initialization work before InstallOperation can be
// applied to this partition