Class: CertID
Represents an CertID described in RFC6960
Hierarchy
-
↳
CertID
Implements
Constructors
constructor
• new CertID(parameters?
): CertID
Initializes a new instance of the CertID class
Parameters
Name | Type | Description |
---|---|---|
parameters | CertIDParameters | Initialization parameters |
Returns
Overrides
Properties
hashAlgorithm
• hashAlgorithm: AlgorithmIdentifier
Hash algorithm used to generate the issuerNameHash
and issuerKeyHash
values
Implementation of
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
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
serialNumber
• serialNumber: Integer
Serial number of the certificate for which status is being requested
Implementation of
CLASS_NAME
▪ Static
CLASS_NAME: string
= "CertID"
Name of the class
Overrides
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
schema | any | ASN.1 schema |
Returns
void
Overrides
isEqual
▸ isEqual(certificateID
): boolean
Checks that two "CertIDs" are equal
Parameters
Name | Type | Description |
---|---|---|
certificateID | CertID | Identifier of the certificate to be checked |
Returns
boolean
toJSON
▸ toJSON(): CertIDJson
Converts the class to JSON object
Returns
JSON object
Overrides
toSchema
▸ toSchema(): Sequence
Converts current object to ASN.1 object and sets correct values
Returns
Sequence
ASN.1 object
Overrides
toString
▸ toString(encoding?
): string
Parameters
Name | Type | Default value |
---|---|---|
encoding | "base64" | "base64url" | "hex" | "hex" |
Returns
string
Inherited from
blockName
▸ blockName(): string
Returns block name
Returns
string
Returns string block name
Inherited from
compareWithDefault
▸ compareWithDefault(memberName
, memberValue
): boolean
Compare values with default values for all class members
Parameters
Name | Type | Description |
---|---|---|
memberName | string | String name for a class member |
memberValue | any | Value to compare with default value |
Returns
boolean
create
▸ create(certificate
, parameters
, crypto?
): Promise
<CertID
>
Making OCSP certificate identifier for specific certificate
Parameters
Name | Type | Description |
---|---|---|
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
): AlgorithmIdentifier
Returns default values for all class members
Parameters
Name | Type | Description |
---|---|---|
memberName | "hashAlgorithm" | String name for a class member |
Returns
Default value
Overrides
▸ defaultValues(memberName
): OctetString
Parameters
Name | Type |
---|---|
memberName | "issuerNameHash" |
Returns
OctetString
Overrides
PkiObject.defaultValues
▸ defaultValues(memberName
): OctetString
Parameters
Name | Type |
---|---|
memberName | "issuerKeyHash" |
Returns
OctetString
Overrides
PkiObject.defaultValues
▸ defaultValues(memberName
): Integer
Parameters
Name | Type |
---|---|
memberName | "serialNumber" |
Returns
Integer
Overrides
PkiObject.defaultValues
fromBER
▸ fromBER<T
>(this
, raw
): T
Creates PKI object from the raw data
Type parameters
Name | Type |
---|---|
T | extends PkiObject |
Parameters
Name | Type | Description |
---|---|---|
this | PkiObjectConstructor <T > | - |
raw | BufferSource | ASN.1 encoded raw data |
Returns
T
Initialized and filled current class object
Inherited from
schema
▸ schema(parameters?
): any
Returns value of pre-defined ASN.1 schema for current class
Parameters
Name | Type | Description |
---|---|---|
parameters | CertIDSchema | Input parameters for the schema |
Returns
any
ASN.1 schema object