Skip to content

ParsedName

An X.501 Distinguished Name decoded from an issuer or subject field.

Provides three views of the same data: ordered RDNs, a flat attribute list, and a convenience key-value map for well-known fields.

ts
interface ParsedName {
	readonly derHex: string;
	readonly rdns: readonly ParsedRelativeDistinguishedName[];
	readonly attributes: readonly ParsedNameAttribute[];
	readonly values: Readonly<Partial<Record<NameFieldKey, string>>>;
}

Properties

  • readonly derHex: string — Hex-encoded DER of the complete Name SEQUENCE, usable for byte-exact comparisons.
  • readonly rdns: readonly ParsedRelativeDistinguishedName[] — Ordered list of RelativeDistinguishedNames, preserving multi-valued RDN structure.
  • readonly attributes: readonly ParsedNameAttribute[] — Flat list of every attribute across all RDNs, in encounter order.
  • readonly values: Readonly<Partial<Record<NameFieldKey, string>>> — First-occurrence map of well-known fields (CN, O, OU, etc.) for quick lookups.

Released under the MIT License.