verify

suspend fun verify(checkExpiry: Boolean = false, expectedLeafType: BCertType? = null, nowSeconds: Long = 0)

Verify the chain end to end.

Each certificate must be signed by the next one out, each issuer must actually be an BCertType.ISSUER that lists the key it signed with, and the outermost certificate must be signed by Microsoft's PlayReady root. Without that last pin a chain would only have to be internally consistent, which anyone can forge.

Parameters

checkExpiry

also reject a certificate whose expiry has passed, given nowSeconds

expectedLeafType

reject a chain whose leaf is not of this type

Throws