summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/binary/TableFlattener_test.cpp
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@sony.com>2020-06-09 18:51:57 +0200
committerRyan Mitchell <rtmitchell@google.com>2020-07-28 18:30:53 +0000
commit9336d9e13b825edd4d368b01084d6623ae9b91cb (patch)
tree0cc0a161c44e8cb5da118f89cb9c89c361ee3332 /tools/aapt2/format/binary/TableFlattener_test.cpp
parent936849dd1a289b372fa667a3c7db990afa23c6d8 (diff)
OMS: Add config_signature policy handling
Alongside SIGNATURE and ACTOR_SIGNATURE policies, add CONFIG_SIGNATURE policy to overlayable that overlay fulfills if it is signed with the same certificate as the reference package whose package name is declared in 'config-signature' tag of SystemConfig and is vetted by OMS that it's a system pre-installed package. BUG: 158726924 TEST: regular aapt2, idmap2, OMS tests Change-Id: I645ee72271496008742886274be0d63a2985201b
Diffstat (limited to 'tools/aapt2/format/binary/TableFlattener_test.cpp')
-rw-r--r--tools/aapt2/format/binary/TableFlattener_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/format/binary/TableFlattener_test.cpp b/tools/aapt2/format/binary/TableFlattener_test.cpp
index 59627ce579af..6932baf76c75 100644
--- a/tools/aapt2/format/binary/TableFlattener_test.cpp
+++ b/tools/aapt2/format/binary/TableFlattener_test.cpp
@@ -776,6 +776,7 @@ TEST_F(TableFlattenerTest, FlattenMultipleOverlayable) {
OverlayableItem overlayable_item_three(group_one);
overlayable_item_three.policies |= PolicyFlags::SIGNATURE;
overlayable_item_three.policies |= PolicyFlags::ACTOR_SIGNATURE;
+ overlayable_item_three.policies |= PolicyFlags::CONFIG_SIGNATURE;
std::unique_ptr<ResourceTable> table =
test::ResourceTableBuilder()
@@ -830,7 +831,8 @@ TEST_F(TableFlattenerTest, FlattenMultipleOverlayable) {
EXPECT_EQ(result_overlayable.overlayable->name, "OtherName");
EXPECT_EQ(result_overlayable.overlayable->actor, "overlay://customization");
EXPECT_EQ(result_overlayable.policies, PolicyFlags::SIGNATURE
- | PolicyFlags::ACTOR_SIGNATURE);
+ | PolicyFlags::ACTOR_SIGNATURE
+ | PolicyFlags::CONFIG_SIGNATURE);
}
TEST_F(TableFlattenerTest, FlattenOverlayableNoPolicyFails) {