OSDN Git Service

Separate logic for alg selection for OTA and APK signing.
authorAlex Klyubin <klyubin@google.com>
Mon, 25 Apr 2016 18:07:03 +0000 (11:07 -0700)
committerAlex Klyubin <klyubin@google.com>
Mon, 25 Apr 2016 18:15:27 +0000 (11:15 -0700)
commit3f52653abfb017a7fdc5819b28bed61f3eaf4498
tree40bc2f58749a35ab65ec15f3d565a9fe9fca6cf7
parent9d868c0800eef398f8d02c13555aa85cf0f8357b
Separate logic for alg selection for OTA and APK signing.

The rules for which digest algorithms are accepted by the Android
platform for APK signatures and OTA update package signatures are
different. For example, the set of digest algorithms accepted for APK
signatures depends on the signing key algorithm and the platform's
API Level. Whereas the set of digest algorithms accepted for OTA
update package signatures by Recovery depends on the list produced
by the build system, which in turn produces the list based on the
key algorithm and digest used in the signing certificate.

To reflect this reality, this refactoring CL explicitly separates
signapk's logic for choosing the digest algorithm to use for v1
signing from its logic for choosing the digest algorithm to use for
OTA update package signing.

Bug: 28296599
Change-Id: Ic7aa77e89622d727e985f8749071284746be7f45
tools/signapk/src/com/android/signapk/SignApk.java