Skip to content
Commit 8d1553b9 authored by Victor Hsieh's avatar Victor Hsieh
Browse files

Verify best signature algorithms of all signers

The previous implementation does not verify signature algorithms of all
signers.  It's possible that the attacker can take an old apk (with
digest and signature of old algorithm) and add their own signer block
with new/P digest and signature.  In this case, the old implementation
only verifies the attacker's signature, thus the attacker can change apk
content easily.

The solution here is to verify digests of all best signature algorithms
by all signers.

It is expected to increase verification time, if the apk does have
multiple signers with different type of digests.

Test: apks still install
Bug: 78359754
Change-Id: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
Merged-In: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
(cherry picked from commit 2f2ced93)
parent cef96f69
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