X509Certificate
Encapsulates an X509 certificate and provides read-only access to its information.
const { X509Certificate } = await import('node:crypto');
const x509 = new X509Certificate('{... pem encoded cert ...}');
console.log(x509.subject);
Since
v15.6.0
Properties
The SHA-1 fingerprint of this certificate.
The SHA-256 fingerprint of this certificate.
The SHA-512 fingerprint of this certificate.
A textual representation of the certificate's authority information access extension.
The issuer certificate or undefined
if the issuer certificate is not available.
An array detailing the key usages for this certificate.
The serial number of this certificate.
The subject alternative name specified for this certificate.
Functions
Checks whether the certificate matches the given email address.
Checks whether the certificate matches the given host name.
Checks whether this certificate was issued by the given otherCert
.
Checks whether the public key for this certificate is consistent with the given private key.
Returns information about this certificate using the legacy certificate object
encoding.