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

Handle a missing Attestation Application ID properly #14

Open
weinbergerd opened this issue Oct 24, 2022 · 0 comments
Open

Handle a missing Attestation Application ID properly #14

weinbergerd opened this issue Oct 24, 2022 · 0 comments

Comments

@weinbergerd
Copy link
Contributor

weinbergerd commented Oct 24, 2022

Some certificates cause the library to exit with a NullPointerException, in our case when ASN1Sequence.fromByteArray(attestationApplicationId.getOctets()); returned null. We need to make sure that these cases don't break the parsing completely.

Stack trace:

20:11:35.636: Caused by: java.lang.NullPointerException
20:11:35.636: 	at com.google.android.attestation.AttestationApplicationId.<init>(AttestationApplicationId.java:50)
20:11:35.636: 	at com.google.android.attestation.AttestationApplicationId.createAttestationApplicationId(AttestationApplicationId.java:79)
20:11:35.636: 	at com.google.android.attestation.AuthorizationList.<init>(AuthorizationList.java:186)
20:11:35.636: 	at com.google.android.attestation.AuthorizationList.createAuthorizationList(AuthorizationList.java:221)
20:11:35.636: 	at com.google.android.attestation.ParsedAttestationRecord.<init>(ParsedAttestationRecord.java:66)
20:11:35.636: 	at com.google.android.attestation.ParsedAttestationRecord.createParsedAttestationRecord(ParsedAttestationRecord.java:78)
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