UNPKG

@wildboar/pkcs

Version:
42 lines 1.56 kB
import { ASN1Element as _Element } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { AttributeCertificate } from "@wildboar/x500/AttributeCertificateDefinitions"; import { Certificate } from "@wildboar/x500/AuthenticationFramework"; import { ExtendedCertificate } from "../PKCS7/ExtendedCertificate.ta.mjs"; /** * @summary CertificateChoice * @description * * ### ASN.1 Definition: * * ```asn1 * CertificateChoice ::= CHOICE { * certificate Certificate, * extendedCertificate [0] ExtendedCertificate, -- Obsolete * attributeCertificate [1] AttributeCertificate * } * ``` */ export type CertificateChoice = { certificate: Certificate; } | { extendedCertificate: ExtendedCertificate; } | { attributeCertificate: AttributeCertificate; }; /** * @summary Decodes an ASN.1 element into a(n) CertificateChoice * @function * @param {_Element} el The element being decoded. * @returns {CertificateChoice} The decoded data structure. */ export declare function _decode_CertificateChoice(el: _Element): CertificateChoice; /** * @summary Encodes a(n) CertificateChoice 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 CertificateChoice, encoded as an ASN.1 Element. */ export declare function _encode_CertificateChoice(value: CertificateChoice, elGetter: $.ASN1Encoder<CertificateChoice>): _Element; //# sourceMappingURL=CertificateChoice.ta.d.mts.map