UNPKG

@wildboar/pkcs

Version:
42 lines 1.6 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 "../CryptographicMessageSyntax/ExtendedCertificate.ta.mjs"; /** * @summary CertificateChoices * @description * * ### ASN.1 Definition: * * ```asn1 * CertificateChoices ::= CHOICE { * certificate Certificate, -- See X.509 * extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete * attrCert [1] IMPLICIT AttributeCertificate * } * ``` */ export type CertificateChoices = { certificate: Certificate; } | { extendedCertificate: ExtendedCertificate; } | { attrCert: AttributeCertificate; }; /** * @summary Decodes an ASN.1 element into a(n) CertificateChoices * @function * @param {_Element} el The element being decoded. * @returns {CertificateChoices} The decoded data structure. */ export declare function _decode_CertificateChoices(el: _Element): CertificateChoices; /** * @summary Encodes a(n) CertificateChoices 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 CertificateChoices, encoded as an ASN.1 Element. */ export declare function _encode_CertificateChoices(value: CertificateChoices, elGetter: $.ASN1Encoder<CertificateChoices>): _Element; //# sourceMappingURL=CertificateChoices.ta.d.mts.map