SubjectAltName
SubjectAltName
RFC 5280 §4.2.1.6 Subject Alternative Name / GeneralName.
Discriminated union keyed on type.
Every GeneralName alternative has a typed variant. Parsing never produces 'unknown', which remains as raw builder input.
ts
type SubjectAltName = {
readonly type: "dns";
readonly value: string
} | {
readonly type: "ip";
readonly value: string
} | {
readonly type: "email";
readonly value: string
} | {
readonly type: "uri";
readonly value: string
} | {
readonly type: "srv";
readonly value: string
} | {
readonly type: "smtpUtf8Mailbox";
readonly value: string
} | {
readonly type: "upn";
readonly value: string
} | {
readonly type: "krb5PrincipalName";
readonly realm: string;
readonly nameType: number;
readonly nameString: readonly string[]
} | {
readonly type: "directoryName";
readonly derHex: string
} | {
readonly type: "otherName";
readonly typeId: string;
readonly value: Uint8Array
} | {
readonly type: "x400Address";
readonly value: Uint8Array
} | {
readonly type: "ediPartyName";
readonly value: Uint8Array
} | {
readonly type: "registeredID";
readonly value: string
} | {
readonly type: "unknown";
readonly tag: number;
readonly value: Uint8Array
}