Readonly
caWill be true
if this is a Certificate Authority (CA) certificate.
Readonly
fingerprintThe SHA-1 fingerprint of this certificate.
Because SHA-1 is cryptographically broken and because the security of SHA-1 is
significantly worse than that of algorithms that are commonly used to sign
certificates, consider using x509.fingerprint256
instead.
Readonly
fingerprint256The SHA-256 fingerprint of this certificate.
Readonly
fingerprint512The SHA-512 fingerprint of this certificate.
Readonly
subjectThe complete subject of this certificate.
Readonly
subjectThe subject alternative name specified for this certificate or undefined
if not available.
Readonly
infoThe information access content of this certificate or undefined
if not
available.
Readonly
keyAn array detailing the key usages for this certificate.
Readonly
issuerThe issuer identification included in this certificate.
Optional
Readonly
issuerThe issuer certificate or undefined
if the issuer certificate is not
available.
Readonly
publicThe public key KeyObject
for this certificate.
Readonly
rawA Buffer
containing the DER encoding of this certificate.
Readonly
serialThe serial number of this certificate.
Serial numbers are assigned by certificate authorities and do not uniquely
identify certificates. Consider using x509.fingerprint256
as a unique
identifier instead.
Readonly
validThe date/time from which this certificate is considered valid.
Readonly
validThe date/time until which this certificate is considered valid.
Checks whether the certificate matches the given email address.
If the 'subject'
option is undefined or set to 'default'
, the certificate
subject is only considered if the subject alternative name extension either does
not exist or does not contain any email addresses.
If the 'subject'
option is set to 'always'
and if the subject alternative
name extension either does not exist or does not contain a matching email
address, the certificate subject is considered.
If the 'subject'
option is set to 'never'
, the certificate subject is never
considered, even if the certificate contains no subject alternative names.
Optional
options: Pick<X509CheckOptions, "subject">Returns email
if the certificate matches, undefined
if it does not.
Checks whether the certificate matches the given host name.
If the certificate matches the given host name, the matching subject name is
returned. The returned name might be an exact match (e.g., foo.example.com
)
or it might contain wildcards (e.g., *.example.com
). Because host name
comparisons are case-insensitive, the returned subject name might also differ
from the given name
in capitalization.
If the 'subject'
option is undefined or set to 'default'
, the certificate
subject is only considered if the subject alternative name extension either does
not exist or does not contain any DNS names. This behavior is consistent with RFC 2818 ("HTTP Over TLS").
If the 'subject'
option is set to 'always'
and if the subject alternative
name extension either does not exist or does not contain a matching DNS name,
the certificate subject is considered.
If the 'subject'
option is set to 'never'
, the certificate subject is never
considered, even if the certificate contains no subject alternative names.
Optional
options: X509CheckOptionsReturns a subject name that matches name
, or undefined
if no subject name matches name
.
Checks whether the certificate matches the given IP address (IPv4 or IPv6).
Only RFC 5280 iPAddress
subject alternative names are considered, and they
must match the given ip
address exactly. Other subject alternative names as
well as the subject field of the certificate are ignored.
Returns ip
if the certificate matches, undefined
if it does not.
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.
A private key.
Returns information about this certificate using the legacy certificate object
encoding.
Verifies that this certificate was signed by the given public key. Does not perform any other validation checks on the certificate.
A public key.
Encapsulates an X509 certificate and provides read-only access to its information.
Since
v15.6.0