Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use API 28 signature retrieval APIs for the allowlisting logic #509

Open
SebastianJay opened this issue Dec 19, 2022 · 0 comments
Open

Use API 28 signature retrieval APIs for the allowlisting logic #509

SebastianJay opened this issue Dec 19, 2022 · 0 comments

Comments

@SebastianJay
Copy link

UAMP uses PackageInfo#signatures, see

val isPackageInAllowList = certificateAllowList[callingPackage]?.signatures?.first {
- this is deprecated in API 28. The newer APIs involve using PackageInfo#signingInfo. The associated APIs on that class - apkContentsSigners, signingCertificateHistory, hasMultipleSigners - need careful attention to ensure they are used correctly. We could adjust UAMP to show proper usage of these APIs.

For reference, this StackOverflow answer - https://stackoverflow.com/a/53407183 - has a reasonable-looking implementation. My understanding is that in the apkContentsSigners path, we should check that all certificates matches, while in the signingCertificateHistory path, we need to only check that one certificate matches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant