Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

Handle a missing Attestation Application ID properly #14

Description

@weinbergerd

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions