TrustedRoot

@Serializable(with = TrustedRootSerializer::class)
sealed interface TrustedRoot(source)

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

This sealed class hierarchy encapsulates otherwise disjoint trust anchor types

A trusted root can be constructed from either:

  • An X.509 certificate, which serves as the trust anchor.

  • A raw public key, optionally associated with a certificate authority's distinguished name.

Inheritors

Types

Link copied to clipboard
@Serializable(with = TrustedRootSerializer::class)
data class Certificate(val certificate: X509Certificate) : TrustedRoot
Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable(with = TrustedRootSerializer::class)
data class PublicKey @JvmOverloads constructor(val publicKey: PublicKey, val caName: X500Principal? = null) : TrustedRoot

Creates a TrustedRoot from a public key.

Properties

Link copied to clipboard
Link copied to clipboard
abstract val publicKey: PublicKey
Link copied to clipboard
abstract val trustAnchor: TrustAnchor
Link copied to clipboard
abstract val value: Asn1Encodable<*>