UNPKG

@wildboar/pkcs

Version:
68 lines (67 loc) 3.98 kB
import { ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { CertificateObject } from "../PKCS-15/CertificateObject.ta"; import { CVCertificateAttributes } from "../PKCS-15/CVCertificateAttributes.ta"; import { PGPCertificateAttributes } from "../PKCS-15/PGPCertificateAttributes.ta"; import { SPKICertificateAttributes } from "../PKCS-15/SPKICertificateAttributes.ta"; import { WTLSCertificateAttributes } from "../PKCS-15/WTLSCertificateAttributes.ta"; import { X509AttributeCertificateAttributes } from "../PKCS-15/X509AttributeCertificateAttributes.ta"; import { X509CertificateAttributes } from "../PKCS-15/X509CertificateAttributes.ta"; import { X9_68CertificateAttributes } from "../PKCS-15/X9-68CertificateAttributes.ta"; export { CertificateObject, _get_decoder_for_CertificateObject, _get_encoder_for_CertificateObject, } from "../PKCS-15/CertificateObject.ta"; export { CVCertificateAttributes, _decode_CVCertificateAttributes, _encode_CVCertificateAttributes, } from "../PKCS-15/CVCertificateAttributes.ta"; export { PGPCertificateAttributes, _decode_PGPCertificateAttributes, _encode_PGPCertificateAttributes, } from "../PKCS-15/PGPCertificateAttributes.ta"; export { SPKICertificateAttributes, _decode_SPKICertificateAttributes, _encode_SPKICertificateAttributes, } from "../PKCS-15/SPKICertificateAttributes.ta"; export { WTLSCertificateAttributes, _decode_WTLSCertificateAttributes, _encode_WTLSCertificateAttributes, } from "../PKCS-15/WTLSCertificateAttributes.ta"; export { X509AttributeCertificateAttributes, _decode_X509AttributeCertificateAttributes, _encode_X509AttributeCertificateAttributes, } from "../PKCS-15/X509AttributeCertificateAttributes.ta"; export { X509CertificateAttributes, _decode_X509CertificateAttributes, _encode_X509CertificateAttributes, } from "../PKCS-15/X509CertificateAttributes.ta"; export { X9_68CertificateAttributes, _decode_X9_68CertificateAttributes, _encode_X9_68CertificateAttributes, } from "../PKCS-15/X9-68CertificateAttributes.ta"; /** * @summary CertificateType * @description * * ### ASN.1 Definition: * * ```asn1 * CertificateType ::= CHOICE { * x509Certificate CertificateObject { X509CertificateAttributes}, * x509AttributeCertificate [0] CertificateObject {X509AttributeCertificateAttributes}, * spkiCertificate [1] CertificateObject {SPKICertificateAttributes}, * pgpCertificate [2] CertificateObject {PGPCertificateAttributes}, * wtlsCertificate [3] CertificateObject {WTLSCertificateAttributes}, * x9-68Certificate [4] CertificateObject {X9-68CertificateAttributes}, * ..., * cvCertificate [5] CertificateObject {CVCertificateAttributes} * } * ``` */ export declare type CertificateType = { x509Certificate: CertificateObject<X509CertificateAttributes>; } | { x509AttributeCertificate: CertificateObject<X509AttributeCertificateAttributes>; } | { spkiCertificate: CertificateObject<SPKICertificateAttributes>; } | { pgpCertificate: CertificateObject<PGPCertificateAttributes>; } | { wtlsCertificate: CertificateObject<WTLSCertificateAttributes>; } | { x9_68Certificate: CertificateObject<X9_68CertificateAttributes>; } | { cvCertificate: CertificateObject<CVCertificateAttributes>; } | _Element; /** * @summary Decodes an ASN.1 element into a(n) CertificateType * @function * @param {_Element} el The element being decoded. * @returns {CertificateType} The decoded data structure. */ export declare function _decode_CertificateType(el: _Element): CertificateType; /** * @summary Encodes a(n) CertificateType 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 CertificateType, encoded as an ASN.1 Element. */ export declare function _encode_CertificateType(value: CertificateType, elGetter: $.ASN1Encoder<CertificateType>): _Element;