Package-level declarations

Types

Link copied to clipboard
abstract class AndroidAttestationChecker(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean)
Link copied to clipboard
@Serializable
data class AndroidAttestationConfiguration @JvmOverloads constructor(val applications: List<AndroidAttestationConfiguration.AppData>, val androidVersion: Int? = null, patchLevel: PatchLevel? = null, val requireStrongBox: Boolean = false, val allowBootloaderUnlock: Boolean = false, val requireRollbackResistance: Boolean = false, val ignoreLeafValidity: Boolean = false, val hardwareAttestationTrustAnchors: Set<@Serializable(with = PubKeyBasePemSerializer::class) PublicKey> = linkedSetOf(*DEFAULT_HARDWARE_TRUST_ANCHORS), val softwareAttestationTrustAnchors: Set<@Serializable(with = PubKeyBasePemSerializer::class) PublicKey> = linkedSetOf(*DEFAULT_SOFTWARE_TRUST_ANCHORS), val verificationSecondsOffset: Long = 0, val attestationStatementValiditySeconds: Long? = 5 * 60, val disableHardwareAttestation: Boolean = false, val enableNougatAttestation: Boolean = false, val enableSoftwareAttestation: Boolean = false, val requireRemoteKeyProvisioning: Boolean = false, val httpProxy: String? = null)

Main Android attestation configuration class serving as ground truth for all key and app attestation verifications.

Link copied to clipboard
@Serializable
class AndroidDebugAttestationStatement(val kind: AndroidDebugAttestationStatement.Type, val configuration: AndroidAttestationConfiguration, val verificationTime: Date, val challenge: ByteArray, val attestationStatement: List<@Serializable(with = CertPemSerializer::class) X509Certificate>)
Link copied to clipboard
object CertPemSerializer : TransformingSerializerTemplate<X509Certificate, String>
Link copied to clipboard
object DateTimeSerializer : KSerializer<Date>
Link copied to clipboard
class HardwareAttestationChecker @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : AndroidAttestationChecker
Link copied to clipboard
class NougatHybridAttestationChecker @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : AndroidAttestationChecker
Link copied to clipboard
@Serializable
data class PatchLevel @JvmOverloads constructor(val year: Int, val month: Int, val maxFuturePatchLevelMonths: Int? = 1)

Represents a Patch level configuration property. Patch levels are defined as year and month.

Link copied to clipboard
object PubKeyBasePemSerializer : TransformingSerializerTemplate<PublicKey, String>
Link copied to clipboard
class SoftwareAttestationChecker @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : AndroidAttestationChecker

Properties

Link copied to clipboard

Default trust anchors used to verify hardware attestation

Link copied to clipboard

Default trust anchors used to verify software attestation

Link copied to clipboard
const val OID_RKP: String

The object identifier containing the remote key provisioning extension.

Functions

Link copied to clipboard
infix fun Any?.contentEqualsIfArray(other: Any?): Boolean
Link copied to clipboard

TRIES to parse the number of remotely provisioned attestation certificates. Note that this method returning null does not necessarily mean that a remotely provisioned certificate is not present. It could very well be that the extension is present but botched. (Looking at you, Samsung!).

Link copied to clipboard

Returns the parsed, but generic contents of the [Remote Key Provisioning

Link copied to clipboard

Indicates whether the attestation certificate in this certificate chain is remotely provisioned.

Link copied to clipboard
fun HttpClientConfig<*>.setup(proxyUrl: String?): <Error class: unknown class>