RicalTrustManager

class RicalTrustManager(val signedRical: SignedRical, val identifier: String = "default", val trustConstraintEvaluator: (constraint: RicalTrustConstraint, chain: List<X509Cert>) -> Boolean? = null) : TrustManagerInterface

An implementation of TrustManagerInterface backed by a RICAL according to ISO/IEC 18013-5 Second Edition Annex F.

Parameters

signedRical
identifier

an identifier for the TrustManagerInterface.

trustConstraintEvaluator

optional callback to evaluate non-empty RicalTrustConstraint entries on the first (bottom-up) matching CA certificate in the validated trust chain per Annex F.3.2.7. When null, any non-empty RicalTrustConstraint is treated as unrecognized and therefore not satisfied.

Constructors

Link copied to clipboard
constructor(signedRical: SignedRical, identifier: String = "default", trustConstraintEvaluator: (constraint: RicalTrustConstraint, chain: List<X509Cert>) -> Boolean? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val identifier: String
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun getTrustPoints(): List<TrustPoint>

Gets all trust points known to this TrustManagerInterface instance.

Link copied to clipboard
open suspend override fun verify(chain: List<X509Cert>, atTime: Instant, validateCaValidity: Boolean, docType: String?): TrustResult

Checks if an entity identifying itself via a certificate chain is trusted for a specific ISO mdoc document type.

open suspend fun verify(chain: List<X509Cert>, atTime: Instant = Clock.System.now(), validateCaValidity: Boolean = true): TrustResult

Checks if an entity identifying itself via a certificate chain is trusted.