OSDN Git Service

Add plsCertsNoVerifyOnlyCerts to ApkSignatureVerifier.
authorDan Cashman <dcashman@google.com>
Mon, 18 Dec 2017 18:38:20 +0000 (10:38 -0800)
committerDaniel Cashman <dcashman@google.com>
Thu, 21 Dec 2017 00:02:51 +0000 (16:02 -0800)
commit636ea5e888197c0705c440bccff81d761ddf354a
tree081aa81ccdd7109c5f8ba565c0df0cdd84c0b4e9
parent6b93e3931e4ae002f8465139598a1104c4c5ae2f
Add plsCertsNoVerifyOnlyCerts to ApkSignatureVerifier.

There are currently two conceptual operations performed by PackageParser
while parsing APKs: collecting certificates and verifying them.
ApkSignatureVerifier relies on the systemDir flag to indicate whether or
not it should do a full verification of a package, but this only applies
when verifying V1 (jar signed) APKs.  This distinction should be explicitly
made.  This creates cleaner code and also saves time when verifying V2
signed systemDir APKs.

Bug: 64686581
Test: Builds, boots, passes
android.appsecurity.cts.PkgInstallSignatureVerificationTest.

Change-Id: Ie8a0f8cad3dd8f70da791f2f1f4516e84e2ae4d0
core/java/android/content/pm/PackageParser.java
core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
core/java/android/util/apk/ApkSignatureVerifier.java