summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/proto/ProtoSerialize.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-10-14 14:52:46 -0700
commit0f942f99cac4f5f61b40847d20ecb3a94c96c843 (patch)
treef68594004b3a5e8ea8999ff76b059fd1432dbda8 /tools/aapt2/format/proto/ProtoSerialize.cpp
parent82cb76f90827c2925ae267f04f395a4e142f6a85 (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 Merged-In: I645ee72271496008742886274be0d63a2985201b Change-Id: I645ee72271496008742886274be0d63a2985201b
Diffstat (limited to 'tools/aapt2/format/proto/ProtoSerialize.cpp')
-rw-r--r--tools/aapt2/format/proto/ProtoSerialize.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/aapt2/format/proto/ProtoSerialize.cpp b/tools/aapt2/format/proto/ProtoSerialize.cpp
index ba6df22af9d3..831229ffa383 100644
--- a/tools/aapt2/format/proto/ProtoSerialize.cpp
+++ b/tools/aapt2/format/proto/ProtoSerialize.cpp
@@ -325,6 +325,9 @@ static void SerializeOverlayableItemToPb(const OverlayableItem& overlayable_item
if (overlayable_item.policies & PolicyFlags::ACTOR_SIGNATURE) {
pb_overlayable_item->add_policy(pb::OverlayableItem::ACTOR);
}
+ if (overlayable_item.policies & PolicyFlags::CONFIG_SIGNATURE) {
+ pb_overlayable_item->add_policy(pb::OverlayableItem::CONFIG_SIGNATURE);
+ }
if (source_pool != nullptr) {
SerializeSourceToPb(overlayable_item.source, source_pool,