aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2022-12-22 10:30:00 -0800
committerBruno Demartino <brunodm@google.com>2023-01-05 12:02:13 +0000
commit9f0379bd60749b375865bd5875cd1c4e52742922 (patch)
treec8b46cfd6a34ede39dd74a848c13d84a6badedf7
parent561c85919c04331939a61503bf5d0dce4e67e454 (diff)
downloadbuild-9f0379bd60749b375865bd5875cd1c4e52742922.tar.gz
Fix VB 1.0 failure due to openssl output format change
Openssl changed output format, the 'keyid:' prefix is removed, hence old regex is unable to extract key id. Bug: 262902909 Change-Id: Iea5b6fffed7c27855d87e35292f07a56686e4197 Merged-In: I446a0b16e482c43542a1c0e41b24e80eb9fbc8e6 Merged-In: Iea5b6fffed7c27855d87e35292f07a56686e4197 (cherry picked from commit b7d70a2cb114ecbe9c931d59d852f5ada771ab52)
-rwxr-xr-xtools/releasetools/sign_target_files_apks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 837eaf9c1e..09d0b10a42 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -1032,7 +1032,7 @@ def ReplaceVerityKeyId(input_zip, output_zip, key_path):
keyid, stderr = p.communicate()
assert p.returncode == 0, "Failed to dump certificate: {}".format(stderr)
keyid = re.search(
- r'keyid:([0-9a-fA-F:]*)', keyid).group(1).replace(':', '').lower()
+ r'Authority Key Identifier:\s*(?:keyid:)?([0-9a-fA-F:]*)', keyid).group(1).replace(':', '').lower()
print("Replacing verity keyid with {}".format(keyid))
out_buffer.append("veritykeyid=id:%s" % (keyid,))