AttestationException

Provides additional details on why an attestation attempt failed, indicating which platform was being attested. Although many reasons exist why an attestation may fail, all of them can be put into two categories:

More specific details about why the attestation failed are communicated to humans in message and are differentiated in cause. A dedicated lazy property platformSpecificCause is present to evaluate and act upon such details (which is just an alias for cause). On Android, platformSpecificCause will always be an instance of AndroidAttestationException containing an enumerable reason which will provide insights.
For iOS, less verbose details are communicated in platformSpecificCause due to a lack of a common root for all throwables.

Concrete examples of platform-specific error cases and their corresponding exceptions and reason codes, refer to Content, Certificate.Trust, and Certificate.Time

Inheritors

Types

Link copied to clipboard

Indicates a problem verifying the certificate chain the attestation statement is built upon. This can either be just a borked certificate chain (i.e. just a wrong certificate somewhere in the chain), or the chain not being rooted in a valid trust anchor. Most probably, however, a legitimate app on a trusted OS will simply have fallen victim to the system clock being too far ahead. This heavily depends on the OS a device was originally shipped with, (or just Samsung being Samsung and being unable to correctly encode a timestamp conforming to ASN.1)

Link copied to clipboard
class Configuration(val platform: Platform, message: String? = null, cause: Throwable) : AttestationException

Thrown on instantiation, for illegal configurations (e.g. no apps configured)

Link copied to clipboard

Indicates that some value (key to be attests, bundle identifier or package name, team identified or signer certificate, etc.) failed to verify This usually means that either the client's OS or the app was compromised/modified (or an implementation error occurred).
For Android, platformSpecificCause is always an AttestationValueException, on iOS it is always an IosAttestationException, both of which have enumerable reason property, which is documented.

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard
Link copied to clipboard
val platformSpecificCause: <Error class: unknown class>

Alias for cause (with more accurate semantics)

Functions

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String