TbsCertificate

@Serializable
data class TbsCertificate constructor(val version: Int? = 2, val serialNumber: ByteArray, val signatureAlgorithm: X509SignatureAlgorithm, val issuerName: List<RelativeDistinguishedName>, val validFrom: Asn1Time, val validUntil: Asn1Time, val subjectName: List<RelativeDistinguishedName>, val publicKey: CryptoPublicKey, val issuerUniqueID: Asn1BitString? = null, val subjectUniqueID: Asn1BitString? = null, val extensions: List<X509CertificateExtension>? = null) : Asn1Encodable<Asn1Sequence>

Very simple implementation of the meat of an X.509 Certificate: The structure that gets signed

Constructors

Link copied to clipboard
constructor(version: Int? = 2, serialNumber: ByteArray, signatureAlgorithm: X509SignatureAlgorithm, issuerName: List<RelativeDistinguishedName>, validFrom: Asn1Time, validUntil: Asn1Time, subjectName: List<RelativeDistinguishedName>, publicKey: CryptoPublicKey, issuerUniqueID: Asn1BitString? = null, subjectUniqueID: Asn1BitString? = null, extensions: List<X509CertificateExtension>? = null)

Types

Link copied to clipboard
object Companion : Asn1Decodable<Asn1Sequence, TbsCertificate>

Properties

Link copied to clipboard
Link copied to clipboard

Contains IssuerAlternativeNames parsed from extensions. This property is initialized right away. This incurs some structural validation, but still allows for contents violating RFC 5280, e.g. all UTF-8 strings are accepted, even though this is too lenient.

Link copied to clipboard
Link copied to clipboard
@Serializable(with = Asn1BitStringSerializer::class)
val issuerUniqueID: Asn1BitString? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Contains SubjectAlternativeNames parsed from extensions. This property is initialized right away. This incurs some structural validation, but still allows for contents violating RFC 5280, e.g. all UTF-8 strings are accepted, even though this is too lenient.

Link copied to clipboard
Link copied to clipboard
@Serializable(with = Asn1BitStringSerializer::class)
val subjectUniqueID: Asn1BitString? = null
Link copied to clipboard
val validFrom: Asn1Time
Link copied to clipboard
val validUntil: Asn1Time
Link copied to clipboard
val version: Int? = 2

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>
Link copied to clipboard
open override fun encodeToTlv(): Asn1Sequence
Link copied to clipboard
open fun encodeToTlvOrNull(): Asn1Sequence?
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Sequence>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open infix fun withImplicitTag(tag: Asn1Element.Tag): Asn1Element
open infix fun withImplicitTag(template: Asn1Element.Tag.Template): Asn1Element
open infix fun withImplicitTag(tagValue: ULong): Asn1Element