summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-05-09 15:09:43 +0900
committerJiyong Park <jiyong@google.com>2020-05-21 10:00:02 +0900
commit2934d557ea9b55c41001dccc7f699901ea21b7dd (patch)
treebd982ef7f864c920b6f255969ca85575c80138a1 /apexer/apexer.py
parenta482dd3eaef4f27cd6f596e98d24de5461c85d1e (diff)
Change the hashtree hash algorithm to sha256
Bug: 155771970 Test: build an arbitrary APEX (e.g. com.android.runtime) $ unzip com.android.runtime.apex $ avbtool info_image --image apex_payload.img | grep Hash Hashtree descriptor: Hash Block Size: 4096 bytes Hash Algorithm: sha256 Test: compare the APEX size before and after the change: no difference Merged-In: I8924349287d38a72be1058424a100c1981f656d1 (cherry picked from commit 85f60588d44baa1bd9cf066fabeb3f4b3f29e323) Change-Id: I8924349287d38a72be1058424a100c1981f656d1
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index 7a114d4..f698c8c 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -546,6 +546,7 @@ def CreateApex(args, work_dir):
cmd.append('add_hashtree_footer')
cmd.append('--do_not_generate_fec')
cmd.extend(['--algorithm', 'SHA256_RSA4096'])
+ cmd.extend(['--hash_algorithm', 'sha256'])
cmd.extend(['--key', args.key])
cmd.extend(['--prop', 'apex.key:' + key_name])
# Set up the salt based on manifest content which includes name