@wildboar/pc
Version:
Trusted Computing Group Platform Certificate ASN.1 data structures in TypeScript
229 lines • 7.23 kB
text/typescript
import { OPTIONAL, BOOLEAN, UTF8String, ASN1Element as _Element } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { ComponentClass } from "../PlatformCertificateProfile/ComponentClass.ta.mjs";
import { PrivateEnterpriseNumber } from "../PlatformCertificateProfile/PrivateEnterpriseNumber.ta.mjs";
import { ComponentAddress } from "../PlatformCertificateProfile/ComponentAddress.ta.mjs";
import { CertificateIdentifier } from "../PlatformCertificateProfile/CertificateIdentifier.ta.mjs";
import { URIReference } from "../PlatformCertificateProfile/URIReference.ta.mjs";
import { AttributeStatus, _enum_for_AttributeStatus } from "../PlatformCertificateProfile/AttributeStatus.ta.mjs";
/**
* @summary ComponentIdentifier
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* ComponentIdentifier ::= SEQUENCE {
* componentClass ComponentClass,
* componentManufacturer UTF8String (SIZE (1..strmax)),
* componentModel UTF8String (SIZE (1..strmax)),
* componentSerial [0] IMPLICIT UTF8String (SIZE (1..strmax)) OPTIONAL,
* componentRevision [1] IMPLICIT UTF8String (SIZE (1..strmax)) OPTIONAL,
* componentManufacturerId [2] IMPLICIT PrivateEnterpriseNumber OPTIONAL,
* fieldReplaceable [3] IMPLICIT BOOLEAN OPTIONAL,
* componentAddresses [4] IMPLICIT SEQUENCE (SIZE(1..MAX)) OF ComponentAddress OPTIONAL,
* componentPlatformCert [5] IMPLICIT CertificateIdentifier OPTIONAL,
* componentPlatformCertUri [6] IMPLICIT URIReference OPTIONAL,
* status [7] IMPLICIT AttributeStatus OPTIONAL }
* ```
*
*/
export declare class ComponentIdentifier {
/**
* @summary `componentClass`.
* @public
* @readonly
*/
readonly componentClass: ComponentClass;
/**
* @summary `componentManufacturer`.
* @public
* @readonly
*/
readonly componentManufacturer: UTF8String;
/**
* @summary `componentModel`.
* @public
* @readonly
*/
readonly componentModel: UTF8String;
/**
* @summary `componentSerial`.
* @public
* @readonly
*/
readonly componentSerial?: OPTIONAL<UTF8String>;
/**
* @summary `componentRevision`.
* @public
* @readonly
*/
readonly componentRevision?: OPTIONAL<UTF8String>;
/**
* @summary `componentManufacturerId`.
* @public
* @readonly
*/
readonly componentManufacturerId?: OPTIONAL<PrivateEnterpriseNumber>;
/**
* @summary `fieldReplaceable`.
* @public
* @readonly
*/
readonly fieldReplaceable?: OPTIONAL<BOOLEAN>;
/**
* @summary `componentAddresses`.
* @public
* @readonly
*/
readonly componentAddresses?: OPTIONAL<ComponentAddress[]>;
/**
* @summary `componentPlatformCert`.
* @public
* @readonly
*/
readonly componentPlatformCert?: OPTIONAL<CertificateIdentifier>;
/**
* @summary `componentPlatformCertUri`.
* @public
* @readonly
*/
readonly componentPlatformCertUri?: OPTIONAL<URIReference>;
/**
* @summary `status`.
* @public
* @readonly
*/
readonly status?: OPTIONAL<AttributeStatus>;
constructor(
/**
* @summary `componentClass`.
* @public
* @readonly
*/
componentClass: ComponentClass,
/**
* @summary `componentManufacturer`.
* @public
* @readonly
*/
componentManufacturer: UTF8String,
/**
* @summary `componentModel`.
* @public
* @readonly
*/
componentModel: UTF8String,
/**
* @summary `componentSerial`.
* @public
* @readonly
*/
componentSerial?: OPTIONAL<UTF8String>,
/**
* @summary `componentRevision`.
* @public
* @readonly
*/
componentRevision?: OPTIONAL<UTF8String>,
/**
* @summary `componentManufacturerId`.
* @public
* @readonly
*/
componentManufacturerId?: OPTIONAL<PrivateEnterpriseNumber>,
/**
* @summary `fieldReplaceable`.
* @public
* @readonly
*/
fieldReplaceable?: OPTIONAL<BOOLEAN>,
/**
* @summary `componentAddresses`.
* @public
* @readonly
*/
componentAddresses?: OPTIONAL<ComponentAddress[]>,
/**
* @summary `componentPlatformCert`.
* @public
* @readonly
*/
componentPlatformCert?: OPTIONAL<CertificateIdentifier>,
/**
* @summary `componentPlatformCertUri`.
* @public
* @readonly
*/
componentPlatformCertUri?: OPTIONAL<URIReference>,
/**
* @summary `status`.
* @public
* @readonly
*/
status?: OPTIONAL<AttributeStatus>);
/**
* @summary Restructures an object into a ComponentIdentifier
* @description
*
* This takes an `object` and converts it to a `ComponentIdentifier`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `ComponentIdentifier`.
* @returns {ComponentIdentifier}
*/
static _from_object(_o: {
[_K in keyof (ComponentIdentifier)]: (ComponentIdentifier)[_K];
}): ComponentIdentifier;
/**
* @summary The enum used as the type of the component `status`
* @public
* @static
*/
static _enum_for_status: typeof _enum_for_AttributeStatus;
}
/**
* @summary The Leading Root Component Types of ComponentIdentifier
* @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_ComponentIdentifier: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of ComponentIdentifier
* @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_ComponentIdentifier: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of ComponentIdentifier
* @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_ComponentIdentifier: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) ComponentIdentifier
* @function
* @param {_Element} el The element being decoded.
* @returns {ComponentIdentifier} The decoded data structure.
*/
export declare function _decode_ComponentIdentifier(el: _Element): ComponentIdentifier;
/**
* @summary Encodes a(n) ComponentIdentifier 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 ComponentIdentifier, encoded as an ASN.1 Element.
*/
export declare function _encode_ComponentIdentifier(value: ComponentIdentifier, elGetter: $.ASN1Encoder<ComponentIdentifier>): _Element;
//# sourceMappingURL=ComponentIdentifier.ta.d.mts.map