Adding sepolicy sign params to sign_target_files_apks.

Bug: b/217570541
Test: sign_target_files_apks --sepolicy_key=build/make/tools/releasetools/testdata/testkey_RSA4096.key
--sepolicy_cert=build/make/tools/releasetools/testdata/testkey.x509.pem target_files.zip target_out.zip
Change-Id: I4ae9f2a3297d10de68c6444dea1cd9996ad9dd11

Change-Id: I4a1ac7009ae0d6bb53c74bd34f8c74f12ea0a3b8
This commit is contained in:
Melisa Carranza Zuniga
2022-03-07 14:56:26 +01:00
committed by Melisa Carranza Zúñiga
parent 0e3ed13950
commit e6d4fb5ae6
4 changed files with 158 additions and 16 deletions

View File

@@ -61,6 +61,7 @@ import apex_utils
import common
logger = logging.getLogger(__name__)
OPTIONS = common.OPTIONS
def SignApexFile(avbtool, apex_file, payload_key, container_key, no_hashtree,
@@ -81,7 +82,7 @@ def SignApexFile(avbtool, apex_file, payload_key, container_key, no_hashtree,
apk_keys=apk_keys,
signing_args=signing_args,
sign_tool=sign_tool,
is_sepolicy=apex_file.endswith("sepolicy.apex"),
is_sepolicy=apex_file.endswith(OPTIONS.sepolicy_name),
sepolicy_key=sepolicy_key,
sepolicy_cert=sepolicy_cert,
fsverity_tool=fsverity_tool)