CompositeTrustManager

class CompositeTrustManager(val trustManagers: List<TrustManagerInterface>, val identifier: String = "composite") : TrustManagerInterface

A TrustManagerInterface implementation which consults a list of other TrustManagerInterface instances.

getTrustPoints will return the trust points of all the included trust managers.

verify is implemented by trying each TrustManagerInterface in sequence and returning a TrustResult for the first one where TrustResult.isTrusted is true. If none is found a TrustResult with TrustResult.isTrusted set to false is returned.

Parameters

trustManagers

a list of TrustManagerInterfaces that will be used for verification.

identifier

an identifier for the TrustManagerInterface.

Constructors

Link copied to clipboard
constructor(trustManagers: List<TrustManagerInterface>, identifier: String = "composite")

Properties

Link copied to clipboard
open override val identifier: String
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): TrustResult

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