@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
106 lines (105 loc) • 3.47 kB
TypeScript
import { ASN1Element as _Element, OPTIONAL } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { CertificateRevocationLists } from "../PKCS7/CertificateRevocationLists.ta";
import { CertificateSet } from "../PKCS7/CertificateSet.ta";
export { CertificateRevocationLists, _decode_CertificateRevocationLists, _encode_CertificateRevocationLists, } from "../PKCS7/CertificateRevocationLists.ta";
export { CertificateSet, _decode_CertificateSet, _encode_CertificateSet, } from "../PKCS7/CertificateSet.ta";
/**
* @summary OriginatorInfo
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* OriginatorInfo ::= SEQUENCE {
* certificates [0] CertificateSet OPTIONAL,
* crls [1] CertificateRevocationLists OPTIONAL
* }
* ```
*
* @class
*/
export declare class OriginatorInfo {
/**
* @summary `certificates`.
* @public
* @readonly
*/
readonly certificates: OPTIONAL<CertificateSet>;
/**
* @summary `crls`.
* @public
* @readonly
*/
readonly crls: OPTIONAL<CertificateRevocationLists>;
constructor(
/**
* @summary `certificates`.
* @public
* @readonly
*/
certificates: OPTIONAL<CertificateSet>,
/**
* @summary `crls`.
* @public
* @readonly
*/
crls: OPTIONAL<CertificateRevocationLists>);
/**
* @summary Restructures an object into a OriginatorInfo
* @description
*
* This takes an `object` and converts it to a `OriginatorInfo`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `OriginatorInfo`.
* @returns {OriginatorInfo}
*/
static _from_object(_o: {
[_K in keyof OriginatorInfo]: OriginatorInfo[_K];
}): OriginatorInfo;
}
/**
* @summary The Leading Root Component Types of OriginatorInfo
* @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_OriginatorInfo: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of OriginatorInfo
* @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_OriginatorInfo: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of OriginatorInfo
* @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_OriginatorInfo: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) OriginatorInfo
* @function
* @param {_Element} el The element being decoded.
* @returns {OriginatorInfo} The decoded data structure.
*/
export declare function _decode_OriginatorInfo(el: _Element): OriginatorInfo;
/**
* @summary Encodes a(n) OriginatorInfo 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 OriginatorInfo, encoded as an ASN.1 Element.
*/
export declare function _encode_OriginatorInfo(value: OriginatorInfo, elGetter: $.ASN1Encoder<OriginatorInfo>): _Element;