Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

stPkixGeneralName

Feature notes: PKIX / CMS implementation notes

Classes, interfaces and records

interfaceiGeneralName

(no public members)

interfaceiGeneralNames

inherits from iASN1CustomStruct

A SEQUENCE OF GeneralName (RFC 5280). This is the collection an app reads or builds for the multi-valued name extensions: subjectAltName / issuerAltName, a CRL distribution point's cRLIssuer and full-name, and authorityKeyIdentifier's authorityCertIssuer. Iterate Items to inspect all entries; use UniqueItems to reach or create a single entry of a given kind.

function get_Items(aIndex: Integer): iGeneralName;
Accessor behind Items; wraps the aIndex-th SEQUENCE element as an iGeneralName.
function get_UniqueItems(aIndex: tGeneralNameEnum): iGeneralName;
Accessor behind UniqueItems; finds (or adds) the first entry whose CHOICE is aIndex.
function get_Text: string;
Accessor behind Text; concatenates the Text of every entry.
property Text: string read get_Text;
Human-readable dump of all entries concatenated; use when logging or displaying a subjectAltName/issuerAltName set rather than round-tripping it.
property Items[aIndex: Integer]: iGeneralName read get_Items;
Positional access to every GeneralName in order; iterate 0..ItemCount-1 when validating or enumerating every alternative name in the extension.
property UniqueItems[aIndex: tGeneralNameEnum]: iGeneralName read get_UniqueItems; default;
Find-or-create the first entry of a given kind (gnDNSName, gnRfc822Name, gnUniformResourceIdentifier, gnIPaddress, ...). Reading it when building a certificate/CRL request materialises that alternative so the caller can set its value; it is the default indexer, so myNames[gnDNSName] works directly.
function AddItem(aChoice: tGeneralNameEnum): iGeneralName;
Append a NEW entry of the given kind and return it, whether or not one of that kind is already there. Full description »

classtGeneralNames

inherits from tASN1CustomOFStruct

implements iGeneralNames

function AddItem(aChoice: tGeneralNameEnum): iGeneralName; property Items[aIndex: Integer]: iGeneralName read get_Items; property UniqueItems[aIndex: tGeneralNameEnum]: iGeneralName read get_UniqueItems; default;

interfaceiGeneralName

inherits from iASN1CustomChoice

function get_AsDirectoryName: iRDNSequence;
Accessor behind the AsDirectoryName property; forces the CHOICE to the directoryName alternative before returning it.
function get_AsDnsname: string;
Accessor behind AsDnsname; selects the dNSName alternative and returns its IA5String content.
function get_AsEdiPartyName: iEDIPartyName;
Accessor behind AsEdiPartyName; selects the ediPartyName alternative.
function get_AsIpaddress: iASN1OctetString;
Accessor behind AsIpaddress; selects the iPAddress alternative (raw octets: 4 = IPv4, 16 = IPv6, or 8/32 = address+mask in name constraints).
function get_AsOtherName: iAnotherName;
Accessor behind AsOtherName; selects the otherName alternative (typeId + ANY value).
function get_AsRegisteredId: ObjectIdentifier;
Accessor behind AsRegisteredId; selects the registeredID alternative.
function get_AsRfc822Name: string;
Accessor behind AsRfc822Name; selects the rfc822Name (email address) alternative.
function get_AsUniformResourceIdentifier: string;
Accessor behind AsUniformResourceIdentifier; selects the URI alternative.
function get_AsX400Address: iORAddress;
Accessor behind AsX400Address; selects the x400Address alternative.
function get_Choice: tGeneralNameEnum;
Accessor behind Choice; reports which alternative is currently selected.
function get_Text: string;
Accessor behind Text; renders the selected alternative as a human-readable string.
procedure set_AsDnsname(const aValue: string);
Mutator behind AsDnsname; selects dNSName and writes the value.
procedure set_AsRegisteredId(const aValue: ObjectIdentifier);
Mutator behind AsRegisteredId; selects registeredID and writes the OID.
procedure set_AsRfc822Name(const aValue: string);
Mutator behind AsRfc822Name; selects rfc822Name and writes the value.
procedure set_AsUniformResourceIdentifier(const aValue: string);
Mutator behind AsUniformResourceIdentifier; selects URI and writes the value.
procedure set_Choice(const aValue: tGeneralNameEnum);
Mutator behind Choice; switches the active alternative (ignored for gnUndefined).
property Choice: tGeneralNameEnum read get_Choice write set_Choice;
A single RFC 5280 GeneralName CHOICE. Read Choice first (or check the relevant tGeneralNameEnum) to learn which alternative is active, then read only the matching AsXxx property. Full description »
property Text: string read get_Text;
Human-readable one-line-per-field rendering of the active alternative, used for certificate viewers / logging; not a wire or comparison value.
property AsOtherName: iAnotherName read get_AsOtherName;
otherName alternative (typeId OID + ANY value); used for identities that have no dedicated CHOICE, e.g. UPN in smart-card / Kerberos certs. Read only when Choice = gnOtherName.
property AsRfc822Name: string read get_AsRfc822Name write set_AsRfc822Name;
rfc822Name alternative: an email address. The common SAN form for S/MIME / e-mail certificates; read when Choice = gnRfc822Name, or assign to make this name an email entry.
property AsDnsname: string read get_AsDnsname write set_AsDnsname;
dNSName alternative: a host name. This is the SAN entry TLS host-name verification matches against; read when Choice = gnDNSName, or assign to add a DNS SAN when generating a server/client certificate or CSR.
property AsX400Address: iORAddress read get_AsX400Address;
x400Address alternative (legacy X.400 O/R address); rarely used by modern apps. Read only when Choice = gnX400Address.
property AsDirectoryName: iRDNSequence read get_AsDirectoryName;
directoryName alternative: a full X.500 RDN sequence. Frequently the CRLIssuer / certificateIssuer identity in CRL distribution points and indirect-CRL handling; read when Choice = gnDirectoryName.
property AsEdiPartyName: iEDIPartyName read get_AsEdiPartyName;
ediPartyName alternative (EDI party); rarely used. Read only when Choice = gnEdiPartyName.
property AsUniformResourceIdentifier: string read get_AsUniformResourceIdentifier write set_AsUniformResourceIdentifier;
uniformResourceIdentifier alternative. Used for URI SAN entries and, in CRL distribution points / authority-info-access, for the HTTP(S) or LDAP URL an app fetches a CRL or OCSP response from. Read when Choice = gnUniformResourceIdentifier, or assign to add a URI entry.
property AsIpaddress: iASN1OctetString read get_AsIpaddress;
iPAddress alternative: the raw address octets (4 bytes IPv4, 16 bytes IPv6; 8/32 bytes when used as a CIDR range in name constraints). The SAN entry matched when a client connects by IP literal; read when Choice = gnIPAddress. Use FormatIPAddress to render it.
property AsRegisteredId: ObjectIdentifier read get_AsRegisteredId write set_AsRegisteredId;
registeredID alternative: a bare OID identity. Read when Choice = gnRegisteredId, or assign to set this name to an OID.

classtGeneralName

property Choice: tGeneralNameEnum read get_Choice write set_Choice; property AsOtherName: iAnotherName read get_AsOtherName implements iAnotherName; property AsRfc822Name: string read get_AsRfc822Name write set_AsRfc822Name; property AsDnsname: string read get_AsDnsname write set_AsDnsname; property AsX400Address: iORAddress read get_AsX400Address implements iORAddress; property AsDirectoryName: iRDNSequence read get_AsDirectoryName implements iRDNSequence; property AsEdiPartyName: iEDIPartyName read get_AsEdiPartyName implements iEDIPartyName; property AsUniformResourceIdentifier: string read get_AsUniformResourceIdentifier write set_AsUniformResourceIdentifier; property AsIpaddress: iASN1OctetString read get_AsIpaddress; property AsRegisteredId: ObjectIdentifier read get_AsRegisteredId write set_AsRegisteredId;

Types (enumerations, sets, aliases)

enumtGeneralNameEnum

  tGeneralNameEnum = (gnUndefined,
                      gnOtherName,
                      gnRfc822Name,
                      gnDNsname,
                      gnX400Address,
                      gnDirectoryName,
                      gnEdiPartyName,
                      gnUniformResourceIdentifier,
                      gnIPaddress,
                      gnRegisteredId);

Routines