Package-level declarations

Types

Link copied to clipboard
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 = true, val verificationSecondsOffset: Long = 0, val attestationStatementValiditySeconds: Long? = 5 * 60, val hardwareTrustedRoots: Set<TrustedRoot> = GOOGLE_DEFAULT_HARDWARE_TRUST_ANCHORS, val softwareTrustedRoots: Set<TrustedRoot> = GOOGLE_SOFTWARE_TRUST_ANCHORS_UNTIL_A11, 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 HardwareAttestationVerifier @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : Roboto
Link copied to clipboard
class NougatHybridAttestationVerifier @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : Roboto
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
abstract class Roboto(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean)
Link copied to clipboard
class SoftwareAttestationVerifier @JvmOverloads constructor(attestationConfiguration: AndroidAttestationConfiguration, verifyChallenge: (expected: ByteArray, actual: ByteArray) -> Boolean = { expected, actual -> expected contentEquals actual }) : Roboto
Link copied to clipboard
@Serializable(with = TrustedRootSerializer::class)
sealed interface TrustedRoot

Represents a trusted root entity, which can either be a public key or an X.509 certificate.

Link copied to clipboard
object TrustedRootSerializer : KSerializer<TrustedRoot>

Properties

Link copied to clipboard

Default public keys used as trust anchors used to verify hardware attestation

Link copied to clipboard

Default public keys used as trust anchors used to verify software attestation

Link copied to clipboard

Default trust anchors used to verify hardware attestation

Link copied to clipboard
val GOOGLE_RKP_EC_ROOT: <Error class: unknown class>
Link copied to clipboard

Default trust anchors used to verify software attestation working up to Android 11. Useful for testing.

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

Leniently (ignore case, and whitespace) parse hex to bytes

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