@wildboar/pki-stub
Version:
X.510 PKI-Stub ASN.1 data structures in TypeScript
60 lines • 1.99 kB
text/typescript
import { ASN1Element as _Element, IA5String, INSTANCE_OF, OBJECT_IDENTIFIER, OCTET_STRING } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { EDIPartyName } from "../CertificateExtensions/EDIPartyName.ta.mjs";
import { Name } from "./Name.ta.mjs";
import { ORAddress } from "../PkiPmiExternalDataTypes/ORAddress.ta.mjs";
/**
* @summary GeneralName
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* GeneralName ::= CHOICE {
* otherName [0] INSTANCE OF OTHER-NAME,
* rfc822Name [1] IA5String,
* dNSName [2] IA5String,
* x400Address [3] ORAddress,
* directoryName [4] Name,
* ediPartyName [5] EDIPartyName,
* uniformResourceIdentifier [6] IA5String,
* iPAddress [7] OCTET STRING,
* registeredID [8] OBJECT IDENTIFIER,
* ... }
* ```
*/
export type GeneralName = {
otherName: INSTANCE_OF;
} | {
rfc822Name: IA5String;
} | {
dNSName: IA5String;
} | {
x400Address: ORAddress;
} | {
directoryName: Name;
} | {
ediPartyName: EDIPartyName;
} | {
uniformResourceIdentifier: IA5String;
} | {
iPAddress: OCTET_STRING;
} | {
registeredID: OBJECT_IDENTIFIER;
} | _Element;
/**
* @summary Decodes an ASN.1 element into a(n) GeneralName
* @function
* @param {_Element} el The element being decoded.
* @returns {GeneralName} The decoded data structure.
*/
export declare function _decode_GeneralName(el: _Element): GeneralName;
/**
* @summary Encodes a(n) GeneralName into an ASN.1 Element.
* @function
* @param value The element being encoded.
* @param elGetter A function that can be used to get new ASN.1 elements.
* @returns {_Element} The GeneralName, encoded as an ASN.1 Element.
*/
export declare function _encode_GeneralName(value: GeneralName, elGetter: $.ASN1Encoder<GeneralName>): _Element;
//# sourceMappingURL=GeneralName.ta.d.mts.map