UNPKG

@wildboar/pc

Version:

Trusted Computing Group Platform Certificate ASN.1 data structures in TypeScript

128 lines (127 loc) 3.88 kB
import { OPTIONAL, BOOLEAN, IA5String, ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { SecurityLevel, _enum_for_SecurityLevel } from "../PlatformCertificateProfile/SecurityLevel.ta"; export { SecurityLevel, _enum_for_SecurityLevel, SecurityLevel_level1, level1, SecurityLevel_level2, level2, SecurityLevel_level3, level3, SecurityLevel_level4, level4, _decode_SecurityLevel, _encode_SecurityLevel } from "../PlatformCertificateProfile/SecurityLevel.ta"; /** * @summary FIPSLevel * @description * * ### ASN.1 Definition: * * ```asn1 * FIPSLevel ::= SEQUENCE { * version IA5String (SIZE (1..strmax)), -- “140-1”, “140-2”, or “140-3” * level SecurityLevel, * plus BOOLEAN DEFAULT FALSE } * ``` * * @class */ export declare class FIPSLevel { /** * @summary `version`. * @public * @readonly */ readonly version: IA5String; /** * @summary `level`. * @public * @readonly */ readonly level: SecurityLevel; /** * @summary `plus`. * @public * @readonly */ readonly plus: OPTIONAL<BOOLEAN>; constructor( /** * @summary `version`. * @public * @readonly */ version: IA5String, /** * @summary `level`. * @public * @readonly */ level: SecurityLevel, /** * @summary `plus`. * @public * @readonly */ plus: OPTIONAL<BOOLEAN>); /** * @summary Restructures an object into a FIPSLevel * @description * * This takes an `object` and converts it to a `FIPSLevel`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `FIPSLevel`. * @returns {FIPSLevel} */ static _from_object(_o: { [_K in keyof (FIPSLevel)]: (FIPSLevel)[_K]; }): FIPSLevel; /** * @summary Getter that returns the default value for `plus`. * @public * @static * @method */ static get _default_value_for_plus(): boolean; /** * @summary The enum used as the type of the component `level` * @public * @static */ static _enum_for_level: typeof _enum_for_SecurityLevel; } /** * @summary The Leading Root Component Types of FIPSLevel * @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_FIPSLevel: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of FIPSLevel * @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_FIPSLevel: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of FIPSLevel * @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_FIPSLevel: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) FIPSLevel * @function * @param {_Element} el The element being decoded. * @returns {FIPSLevel} The decoded data structure. */ export declare function _decode_FIPSLevel(el: _Element): FIPSLevel; /** * @summary Encodes a(n) FIPSLevel 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 FIPSLevel, encoded as an ASN.1 Element. */ export declare function _encode_FIPSLevel(value: FIPSLevel, elGetter: $.ASN1Encoder<FIPSLevel>): _Element;