Constructor
new CRL(crl)
This class encapsulates a X.509 certificate revocation list (CRL) of RevokedCertificate objects.
Note: the methods and constructors that input a CRL do not automatically verify it. You need to explicitly call the verify method.
Note: the methods and constructors that input a CRL do not automatically verify it. You need to explicitly call the verify method.
Parameters:
| Name | Type | Description |
|---|---|---|
crl |
FormatedData | GostASN1.CertificateList |
- Source:
Extends
Methods
-
check()
-
Check the object structure
- Inherited From:
- Source:
-
decode(source)
-
Decode the source to self object
Parameters:
Name Type Description sourceFormatedData Encoded data - Inherited From:
- Source:
-
encode(format) → {FormatedData}
-
Encode the object
Parameters:
Name Type Description formatstring Encoding format 'DER', 'CER' or 'PEM' - Inherited From:
- Source:
Returns:
- Type
- FormatedData
-
isRevoked(serialNumber, date) → {boolean}
-
Checks whether this certificate serial number is on the list.
Parameters:
Name Type Description serialNumberNumber the issuer's certificate dateDate Validation date. Default current date - Source:
Returns:
True if the certificate is valid, and false otherwise- Type
- boolean
-
sign(issuerPrivateKey, issuerCertificate) → {Promise}
-
Signs this CRL. The issuer's private key has to be set. The default random number generator is used, if needed.
Note: Making any modifications to the contents of the CRL after signing invalidates the signature. The sign method must be invoked again after any modifications for a valid signature to be computed.Parameters:
Name Type Description issuerPrivateKeyGostASN1.PrivateKeyInfo the issuer's private signing key issuerCertificateGostCert.X509 the issuer's certificate - Source:
Returns:
Promise to return self object after sign the CRL- Type
- Promise
-
verify(issuerCertificate, date) → {Promise}
-
Verify the CRL. Checks the date and signature if issuer's certifiate has been defined.
Parameters:
Name Type Description issuerCertificateGostCert.X509 the issuer's certificate dateDate Validation date. Default current date - Source:
Returns:
Promise to return self object if the certificate is valid- Type
- Promise