UNPKG

@wildboar/pki-stub

Version:
120 lines (119 loc) 3.55 kB
import { OPTIONAL, ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { IssuerSerial } from "../PKI-Stub/IssuerSerial.ta"; import { GeneralNames } from "../PKI-Stub/GeneralNames.ta"; import { ObjectDigestInfo } from "../PKI-Stub/ObjectDigestInfo.ta"; /** * @summary Holder * @description * * ### ASN.1 Definition: * * ```asn1 * Holder ::= SEQUENCE { * baseCertificateID [0] IssuerSerial OPTIONAL, * entityName [1] GeneralNames OPTIONAL, * objectDigestInfo [2] ObjectDigestInfo OPTIONAL } * (WITH COMPONENTS {..., baseCertificateID PRESENT } | * WITH COMPONENTS {..., entityName PRESENT } | * WITH COMPONENTS {..., objectDigestInfo PRESENT } ) * ``` * * @class */ export declare class Holder { /** * @summary `baseCertificateID`. * @public * @readonly */ readonly baseCertificateID?: OPTIONAL<IssuerSerial>; /** * @summary `entityName`. * @public * @readonly */ readonly entityName?: OPTIONAL<GeneralNames>; /** * @summary `objectDigestInfo`. * @public * @readonly */ readonly objectDigestInfo?: OPTIONAL<ObjectDigestInfo>; constructor( /** * @summary `baseCertificateID`. * @public * @readonly */ baseCertificateID?: OPTIONAL<IssuerSerial>, /** * @summary `entityName`. * @public * @readonly */ entityName?: OPTIONAL<GeneralNames>, /** * @summary `objectDigestInfo`. * @public * @readonly */ objectDigestInfo?: OPTIONAL<ObjectDigestInfo>); /** * @summary Restructures an object into a Holder * @description * * This takes an `object` and converts it to a `Holder`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `Holder`. * @returns {Holder} */ static _from_object(_o: { [_K in keyof Holder]: Holder[_K]; }): Holder; } /** * @summary The Leading Root Component Types of Holder * @description * * This is an array of `ComponentSpec`s that define how to decode the leading root component type list of a SET or SEQUENCE. * * @constant */ export declare const _root_component_type_list_1_spec_for_Holder: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of Holder * @description * * This is an array of `ComponentSpec`s that define how to decode the trailing root component type list of a SET or SEQUENCE. * * @constant */ export declare const _root_component_type_list_2_spec_for_Holder: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of Holder * @description * * This is an array of `ComponentSpec`s that define how to decode the extension addition component type list of a SET or SEQUENCE. * * @constant */ export declare const _extension_additions_list_spec_for_Holder: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) Holder * @function * @param {_Element} el The element being decoded. * @returns {Holder} The decoded data structure. */ export declare function _decode_Holder(el: _Element): Holder; /** * @summary Encodes a(n) Holder into an ASN.1 Element. * @function * @param {value} el The element being decoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The Holder, encoded as an ASN.1 Element. */ export declare function _encode_Holder(value: Holder, elGetter: $.ASN1Encoder<Holder>): _Element;