UNPKG

@wildboar/pkcs

Version:
197 lines 5.8 kB
import { ASN1Element as _Element, BOOLEAN, OPTIONAL } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { CredentialIdentifier } from "../PKCS-15/CredentialIdentifier.ta.mjs"; import { Identifier } from "../PKCS-15/Identifier.ta.mjs"; import { Usage } from "../PKCS-15/Usage.ta.mjs"; import { OOBCertHash } from "../PKIXCMP-2009/OOBCertHash.ta.mjs"; /** * @summary CommonCertificateAttributes * @description * * ### ASN.1 Definition: * * ```asn1 * CommonCertificateAttributes ::= SEQUENCE { * iD Identifier, * authority BOOLEAN DEFAULT FALSE, * identifier CredentialIdentifier{{KeyIdentifiers}} OPTIONAL, * certHash [0] OOBCertHash OPTIONAL, * ..., * trustedUsage [1] Usage OPTIONAL, * identifiers [2] SEQUENCE OF CredentialIdentifier{{KeyIdentifiers}} OPTIONAL, * implicitTrust [3] BOOLEAN DEFAULT FALSE * } * ``` * */ export declare class CommonCertificateAttributes { /** * @summary `iD`. * @public * @readonly */ readonly iD: Identifier; /** * @summary `authority`. * @public * @readonly */ readonly authority?: OPTIONAL<BOOLEAN>; /** * @summary `identifier`. * @public * @readonly */ readonly identifier?: OPTIONAL<CredentialIdentifier>; /** * @summary `certHash`. * @public * @readonly */ readonly certHash?: OPTIONAL<OOBCertHash>; /** * @summary `trustedUsage`. * @public * @readonly */ readonly trustedUsage?: OPTIONAL<Usage>; /** * @summary `identifiers`. * @public * @readonly */ readonly identifiers?: OPTIONAL<CredentialIdentifier[]>; /** * @summary `implicitTrust`. * @public * @readonly */ readonly implicitTrust?: OPTIONAL<BOOLEAN>; /** * @summary Extensions that are not recognized. * @public * @readonly */ readonly _unrecognizedExtensionsList: _Element[]; constructor( /** * @summary `iD`. * @public * @readonly */ iD: Identifier, /** * @summary `authority`. * @public * @readonly */ authority?: OPTIONAL<BOOLEAN>, /** * @summary `identifier`. * @public * @readonly */ identifier?: OPTIONAL<CredentialIdentifier>, /** * @summary `certHash`. * @public * @readonly */ certHash?: OPTIONAL<OOBCertHash>, /** * @summary `trustedUsage`. * @public * @readonly */ trustedUsage?: OPTIONAL<Usage>, /** * @summary `identifiers`. * @public * @readonly */ identifiers?: OPTIONAL<CredentialIdentifier[]>, /** * @summary `implicitTrust`. * @public * @readonly */ implicitTrust?: OPTIONAL<BOOLEAN>, /** * @summary Extensions that are not recognized. * @public * @readonly */ _unrecognizedExtensionsList?: _Element[]); /** * @summary Restructures an object into a CommonCertificateAttributes * @description * * This takes an `object` and converts it to a `CommonCertificateAttributes`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `CommonCertificateAttributes`. * @returns {CommonCertificateAttributes} */ static _from_object(_o: { [_K in keyof CommonCertificateAttributes]: CommonCertificateAttributes[_K]; }): CommonCertificateAttributes; /** * @summary Getter that returns the default value for `authority`. * @public * @static * @method */ static get _default_value_for_authority(): BOOLEAN; /** * @summary Getter that returns the default value for `implicitTrust`. * @public * @static * @method */ static get _default_value_for_implicitTrust(): BOOLEAN; } /** * @summary The Leading Root Component Types of CommonCertificateAttributes * @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_CommonCertificateAttributes: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of CommonCertificateAttributes * @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_CommonCertificateAttributes: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of CommonCertificateAttributes * @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_CommonCertificateAttributes: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) CommonCertificateAttributes * @function * @param {_Element} el The element being decoded. * @returns {CommonCertificateAttributes} The decoded data structure. */ export declare function _decode_CommonCertificateAttributes(el: _Element): CommonCertificateAttributes; /** * @summary Encodes a(n) CommonCertificateAttributes 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 CommonCertificateAttributes, encoded as an ASN.1 Element. */ export declare function _encode_CommonCertificateAttributes(value: CommonCertificateAttributes, elGetter: $.ASN1Encoder<CommonCertificateAttributes>): _Element; //# sourceMappingURL=CommonCertificateAttributes.ta.d.mts.map