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
Loading
Please register or sign in to comment