ConfigurableTrustManager

A TrustManagerInterface implementation backed by a configurable list of TrustEntry items.

The entries may be updated later using setEntries.

This is typically used when receiving a lists of TrustEntry items from e.g. a backend server.

Parameters

identifier

an identifier for the TrustManagerInterface instance.

entries

A list of TrustEntry objects (e.g., TrustEntryX509Cert, TrustEntryVical).

Constructors

Link copied to clipboard
constructor(identifier: String, entries: List<TrustEntry>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val eventFlow: SharedFlow<Unit>

A reactive stream of events emitted whenever the underlying trust data changes. Observers can collect this flow to know when to refresh their cached UI states.

Link copied to clipboard
open override val identifier: String

Functions

Link copied to clipboard
open suspend override fun getEntries(): List<TrustEntry>

Retrieves all TrustEntry items currently managed.

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

Gets all trust points known to this TrustManagerInterface instance.

Link copied to clipboard
suspend fun setEntries(entries: List<TrustEntry>)

Sets which TrustEntry items to use.

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

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