Skip to content
Commit a4a01127 authored by Michael Groover's avatar Michael Groover
Browse files

Update PM#checkSignatures to support pre-key rotation behavior

When key rotation was added in P all of the existing signature methods
were updated to support pre-key rotation behavior (eg GET_SIGNATURES
returns the first key in the signing lineage), but checkSignatures
was not updated to support similar behavior. This commit updates
checkSignatures to check the oldest signer in the lineage, if either
of the reqested packages has one, if the existing signature check fails.
This allows a developer to compare their app signed with a rotated key
against both an app signed with the previous key as well as an app
signed with only the new key.

Bug: 153910385
Test: atest PackageManagerTests
Test: atest PackageManagerTest
Change-Id: Id0af68bab2b85dc91643551b1f5934c2b8df317f
parent 0fcab06f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment