AttestationClient

class AttestationClient(client: HttpClient)(source)

Mobile client, fetching attestation challenges and posting CSRs containing attestation statements to an attestation verification endpoint.

Based on a Ktor client. Automatically installs JSON content negotiation.

Constructors

Link copied to clipboard
constructor(client: HttpClient)

Functions

Link copied to clipboard
suspend fun attest(csr: Pkcs10CertificationRequest, destination: Url): AttestationResponse

Posts a csr containing an attestation challenge, as created by createCsr.

Link copied to clipboard
suspend fun getChallenge(endpoint: Url): KmmResult<AttestationChallenge>

Fetches a challenge from an endpoint. This is the first step in an attestation ceremony. This will fail if the system time is off too much: