NormalizedX509Serializer

Custom serializer for a certificate chain (List<ByteArray>).

Serialization (Writing): Complies with RFC 9360, Section 2 by writing a single certificate directly as a raw CBOR Byte String (bstr), and multiple certificates as a CBOR Array of Byte Strings ([ 2* bstr ]).

Deserialization (Reading): Strictly expects a CBOR Array format ([ * bstr ]) for any certificate list (which is why upstream pre-normalization (e.g. via ZkDocumentDataWrapperSerializer) is required to convert single raw bstr values into 1-item arrays).

null values are supported through standard property nullability.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): List<ByteArray>

Deserializes a list of X.509 certificates from the specified decoder.

Link copied to clipboard
open override fun serialize(encoder: Encoder, value: List<ByteArray>)

Serializes a list of byte arrays representing X.509 certificates into the specified encoder according to RFC 9360, Section 2.