AttestationChallenge

@Serializable
data class AttestationChallenge constructor(val issuedAt: Instant, val validity: Duration? = null, val timeZone: TimeZone? = null, val nonce: ByteArray, val attestationEndpoint: String, val proofOID: ObjectIdentifier)(source)

A generic representation of a challenge sent the server.

Constructors

Link copied to clipboard
constructor(issuedAt: Instant, validUntil: Instant, timeZone: TimeZone?, nonce: ByteArray, attestationEndpoint: String, proofOID: ObjectIdentifier)

Convenience constructor to pass two instants instead of instant and duration

constructor(issuedAt: Instant, validity: Duration? = null, timeZone: TimeZone? = null, nonce: ByteArray, attestationEndpoint: String, proofOID: ObjectIdentifier)

Properties

Link copied to clipboard

The endpoint to post the CSR containing the attestation proof to

Link copied to clipboard

The issuing time of the nonce. Useful to detect clock drifts and exit early. This is not considered sensible information, as clocks must be in sync anyhow.

Link copied to clipboard
@Serializable(with = ByteArrayBase64UrlSerializer::class)
val nonce: ByteArray

The nonce chosen by the server. Must be at most 128 bytes long, as this is the largest nonce size supported by Android.

Link copied to clipboard
@Serializable(with = ObjectIdentifierStringSerializer::class)
val proofOID: ObjectIdentifier

The OID to be used for encoding the attestation proof into the signed CSR used to transfer the proof.

Link copied to clipboard
@Serializable(with = TimeZoneSerializer::class)
val timeZone: TimeZone? = null

The server timezone. Can be omitted if the server does not want to disclose this information

Link copied to clipboard
val validity: Duration? = null

How long this nonce is considered valid. Can be omitted, if the server does not want to disclose this information.

Link copied to clipboard

Lazily-evaluated property

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getRdnSerialNumber(): AttributeTypeAndValue

Encapsulates the nonce encoded into a KnownOIDs.serialNumber RDN component for easier parsing

Link copied to clipboard
open override fun hashCode(): Int