Creates a new Certificate instance.
Configuration object
The signature algorithm
The signature bits
The TBSCertificate structure
Algorithm used to sign this certificate.
The digital signature value from the issuer.
The "to be signed" certificate containing most certificate data.
StaticTBSReference to TBSCertificate class for easy access.
Gets the PEM header name for this object type. Converts the class name to uppercase for use in PEM encoding.
Gets the PKI type name for this object (typically the class name). Used for PEM headers and debugging output.
Compares this PKI object with another for equality. Two objects are considered equal if their DER encodings are identical.
The other PKI object to compare with
true if the objects are equal, false otherwise
Returns the Common Name (CN) from the certificate's subject, or undefined if not present.
Returns all Subject Alternative Names from the certificate's extensions.
Returns all Subject Alternative Names as strings (e.g. DNS names, email addresses). This is a convenience method that extracts the string representation of each SAN entry.
An array of strings representing the Subject Alternative Names.
Parses this object as a different PKI type. Useful for converting between related PKI structures.
The target type to parse as
The target type constructor with parsing capabilities
A new instance of the target type
Optionaloptions: { crlDistributionPointUrls?: string[] }Optionaloptions: { issuerCertificateUrls?: string[] }Optionaloptions: {Converts the certificate to an ASN.1 structure.
Converts this PKI object to DER (Distinguished Encoding Rules) format.
The DER-encoded bytes of this object
Returns a human-readable string representation of this object. By default, returns the same as toString(), but subclasses can override for more user-friendly output.
A human-readable string representation
Converts this PKI object to PEM (Privacy-Enhanced Mail) format.
A PEM-encoded string with appropriate headers
Returns a string representation of this PKI object. Includes the type name and ASN.1 structure.
A string representation for debugging
Optionaloptions: CertificateValidationOptionsStaticcreateStaticcreateStaticfromCreates a Certificate from an ASN.1 structure.
The ASN.1 structure
The Certificate
StaticfromStaticfrom
Represents an X.509 certificate.
An X.509 certificate is a digital certificate that binds a public key to an identity. It contains information about the certificate holder (subject), the issuer, validity period, extensions, and a digital signature from the issuer. This class provides comprehensive support for parsing, validating, and working with X.509 certificates.
Asn
Example