OSDN Git Service

List SHA-1 digests of APK entries' contents in .SF files.
authorAlex Klyubin <klyubin@google.com>
Tue, 12 Jan 2016 20:23:11 +0000 (12:23 -0800)
committerAlex Klyubin <klyubin@google.com>
Tue, 12 Jan 2016 20:36:46 +0000 (12:36 -0800)
commit8502937cff58c036a2ac05671e1e46d1cbb46425
treec91299fbc4091821bc3a2e3bb7d8717c59fb9c8d
parent49d5d5576e714a733b952506bcc49d660d8a4afb
List SHA-1 digests of APK entries' contents in .SF files.

Due to a bug introduced in 8562fd478d7f1b1b693de5db67928f1993522c0a
SHA-1 digests of APK entries' contents were listed under wrong
attribute name. The effect is equivalent to not listing SHA-1
digests.

This change fix the issue by listing SHA-1 digests under the correct
attribute name. However, these digests are not that useful because:
(1) typically the digest of the MANIFEST.MF verifies and thus the
per-entry digests are ignored, and (2) per-entry digests of entries
with names longer than 64 characters are wrong in any case because the
digest generation code does not take into account that such names are
split over multiple lines.

An alternative to this change would be to completely omit outputting
per-entry sections of .SF files, thus saving space and speeding up APK
verification (.SF files would decompress faster).

Bug: 26513901
Change-Id: If95d58e9baa62b1113639fe70724e1e9c9f4e15c
tools/signapk/src/com/android/signapk/SignApk.java