OSDN Git Service

Only remember the signer certificates for Signatures
authorKenny Root <kroot@google.com>
Thu, 24 Apr 2014 18:44:47 +0000 (11:44 -0700)
committerKenny Root <kroot@google.com>
Tue, 29 Apr 2014 18:08:50 +0000 (11:08 -0700)
commita8e65fd82a323e6065ae9ae6cc8eaa130d3c1efd
tree4b41f44dde2a5873043da66f0c535b30f58f3179
parent25ff2c1ec1b0a3e33710fcf6777abd0fed809877
Only remember the signer certificates for Signatures

Previously we would use the JarEntry#getCertificates API which would
return a flattened array of all the signers and their certificate chain.
Since this isn't what was intended, switch to reading the certificate
chains and only paying attention to the signer certificate.

In order to migrate during upgrades of the platform, we'll scan on boot
with a compatibility mode which will check the stores signatures in the
old format by flattening the chains of the scanned packages then
comparing the two sets.

Bug: 13678484
Change-Id: I02a5c53121d8d6f70a51d7e3b98168a41e11482e
core/java/android/content/pm/PackageParser.java
core/java/android/content/pm/Signature.java
services/core/java/com/android/server/pm/PackageManagerService.java
services/core/java/com/android/server/pm/Settings.java