Skip to main content

CertID

Represents an CertID described in RFC6960

Extends

Implements

Constructors

new CertID()

new CertID(parameters): CertID

Initializes a new instance of the CertID class

Parameters

parameters: CertIDParameters = {}

Initialization parameters

Returns

CertID

Overrides

PkiObject.constructor

Properties

hashAlgorithm

hashAlgorithm: AlgorithmIdentifier

Hash algorithm used to generate the issuerNameHash and issuerKeyHash values

Implementation of

ICertID.hashAlgorithm


issuerKeyHash

issuerKeyHash: OctetString

Hash of the issuer's public key. The hash shall be calculated over the value (excluding tag and length) of the subject public key field in the issuer's certificate.

Implementation of

ICertID.issuerKeyHash


issuerNameHash

issuerNameHash: OctetString

Hash of the issuer's distinguished name (DN). The hash shall be calculated over the DER encoding of the issuer's name field in the certificate being checked.

Implementation of

ICertID.issuerNameHash


serialNumber

serialNumber: Integer

Serial number of the certificate for which status is being requested

Implementation of

ICertID.serialNumber


CLASS_NAME

static CLASS_NAME: string = "CertID"

Name of the class

Overrides

PkiObject.CLASS_NAME

Accessors

className

get className(): string

Returns

string

Inherited from

PkiObject.className

Methods

createForCertificate()

createForCertificate(certificate, parameters, crypto): Promise<void>

Making OCSP certificate identifier for specific certificate

Parameters

certificate: Certificate

Certificate making OCSP Request for

parameters: CertIDCreateParams

Additional parameters

crypto: ICryptoEngine = ...

Crypto engine

Returns

Promise<void>


fromSchema()

fromSchema(schema): void

Converts parsed ASN.1 object into current class

Parameters

schema: any

ASN.1 schema

Returns

void

Overrides

PkiObject.fromSchema


isEqual()

isEqual(certificateID): boolean

Checks that two "CertIDs" are equal

Parameters

certificateID: CertID

Identifier of the certificate to be checked

Returns

boolean


toJSON()

toJSON(): CertIDJson

Converts the class to JSON object

Returns

CertIDJson

JSON object

Overrides

PkiObject.toJSON


toSchema()

toSchema(): Sequence

Converts current object to ASN.1 object and sets correct values

Returns

Sequence

ASN.1 object

Overrides

PkiObject.toSchema


toString()

toString(encoding): string

Parameters

encoding: "base64" | "base64url" | "hex" = "hex"

Returns

string

Inherited from

PkiObject.toString


blockName()

static blockName(): string

Returns block name

Returns

string

Returns string block name

Inherited from

PkiObject.blockName


compareWithDefault()

static compareWithDefault(memberName, memberValue): boolean

Compare values with default values for all class members

Parameters

memberName: string

String name for a class member

memberValue: any

Value to compare with default value

Returns

boolean


create()

static create(certificate, parameters, crypto): Promise<CertID>

Making OCSP certificate identifier for specific certificate

Parameters

certificate: Certificate

Certificate making OCSP Request for

parameters: CertIDCreateParams

Additional parameters

crypto: ICryptoEngine = ...

Crypto engine

Returns

Promise<CertID>

Returns created CertID object


defaultValues()

defaultValues(memberName)

static defaultValues(memberName): AlgorithmIdentifier

Returns default values for all class members

Parameters

memberName: "hashAlgorithm"

String name for a class member

Returns

AlgorithmIdentifier

Default value

Overrides

PkiObject.defaultValues

defaultValues(memberName)

static defaultValues(memberName): OctetString

Returns default values for all class members

Parameters

memberName: "issuerNameHash"

String name for a class member

Returns

OctetString

Default value

Overrides

PkiObject.defaultValues

defaultValues(memberName)

static defaultValues(memberName): OctetString

Returns default values for all class members

Parameters

memberName: "issuerKeyHash"

String name for a class member

Returns

OctetString

Default value

Overrides

PkiObject.defaultValues

defaultValues(memberName)

static defaultValues(memberName): Integer

Returns default values for all class members

Parameters

memberName: "serialNumber"

String name for a class member

Returns

Integer

Default value

Overrides

PkiObject.defaultValues


fromBER()

static fromBER<T>(this, raw): T

Creates PKI object from the raw data

Type Parameters

T extends PkiObject

Parameters

this: PkiObjectConstructor<T>

raw: BufferSource

ASN.1 encoded raw data

Returns

T

Initialized and filled current class object

Inherited from

PkiObject.fromBER


schema()

static schema(parameters): any

Returns value of pre-defined ASN.1 schema for current class

Parameters

parameters: CertIDSchema = {}

Input parameters for the schema

Returns

any

ASN.1 schema object

Overrides

PkiObject.schema