AttestationKeyDescription

class AttestationKeyDescription(val attestationVersion: Int, val attestationSecurityLevel: AttestationKeyDescription.SecurityLevel, val keyMintVersion: Int, val keyMintSecurityLevel: AttestationKeyDescription.SecurityLevel, val attestationChallenge: ByteArray, val uniqueId: ByteArray, val softwareEnforced: AuthorizationList, val hardwareEnforced: AuthorizationList) : Asn1Encodable<Asn1Sequence> , Identifiable, PrettyPrintable(source)

Attestation certificate extension used by Google. While we could use sophisticated sanity checks to ensure that only valid extensions that conform to the schema in every aspect, the reality is ugly, with device manufacturers being very creative about how and what will be encoded into softwareEnforced and hardwareEnforced. Hence, we must be able to parse extensions that are structurally valid at first glance, even when the actual values inside look like they have been through a meat grinder. As long as those values we check for during attestation validation are there and contain the values required for a successful assessment, we're golden! Hence, barely any sanity checks are enforced.

Constructors

Link copied to clipboard
constructor(attestationVersion: Int, attestationSecurityLevel: AttestationKeyDescription.SecurityLevel, keyMintVersion: Int, keyMintSecurityLevel: AttestationKeyDescription.SecurityLevel, attestationChallenge: ByteArray, uniqueId: ByteArray, softwareEnforced: AuthorizationList, hardwareEnforced: AuthorizationList)

Types

Link copied to clipboard
object Companion : Identifiable, Asn1Decodable<Asn1Sequence, AttestationKeyDescription>
Link copied to clipboard
enum SecurityLevel : Asn1Encodable<Asn1Primitive> , Enum<AttestationKeyDescription.SecurityLevel>

Attestation security level as defined by Google.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

alias for keyMintSecurityLevel for backwards compatibility for attestationVersion<=4

Link copied to clipboard

alias for keyMintVersion for backwards compatibility for attestationVersion<=4

Link copied to clipboard
Link copied to clipboard
open override val oid: ObjectIdentifier
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun doPrettyPrint(indent: String): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>
Link copied to clipboard
open override fun encodeToTlv(): Asn1Sequence
Link copied to clipboard
open fun encodeToTlvOrNull(): Asn1Sequence?
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Sequence>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
open infix fun withImplicitTag(tag: Asn1Element.Tag): Asn1Element
open infix fun withImplicitTag(template: Asn1Element.Tag.Template): Asn1Element
open infix fun withImplicitTag(tagValue: ULong): Asn1Element