Get apexd to verify manifest data
Send the name and version we read from the manifest to apexd to make
sure it doesn't change.
Remove image hash since we have no use for it.
Put the manifest extraction & verification behind a flag since it now
has the potential to change behavior.
Expand on the comment for verify(), to make it clearer what it does
and doesn't verify.
Bug: 313042092
Test: atest ApexTestCases
Test: atest MicrodroidTests
Test: atest libapexutil_rust.test
Change-Id: Ida6d9e11b3bce5676b744dc945eadb09aa9a822f
diff --git a/microdroid/payload/metadata.proto b/microdroid/payload/metadata.proto
index 6b999af..b03d466 100644
--- a/microdroid/payload/metadata.proto
+++ b/microdroid/payload/metadata.proto
@@ -37,14 +37,18 @@
}
message ApexPayload {
+ // Next id: 9
+
// Required.
string name = 1;
string partition_name = 2;
// Optional.
- // When specified, apex payload should be verified with the public key and root digest.
+ // When specified, apex payload should be verified against these values.
bytes public_key = 3;
bytes root_digest = 4;
+ int64 manifest_version = 7;
+ string manifest_name = 8;
// Required.
// The timestamp in seconds when the APEX was last updated. This should match the value in