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
1 file changed