Class X509Certificate

Represents an X.509 public key certificate as defined in RFC 5280.

It provides access to the standard fields of an X.509 certificate including version, serial number, validity period, distinguished names, and signature algorithm.

Property Summary 

PropertyDescription
issuerDN: String (read-only)Returns the X.500 distinguished name of the entity that signed this certificate.
notAfter: Date (read-only)Returns the end date of the certificate validity period.
notBefore: Date (read-only)Returns the start date of the certificate validity period.
serialNumber: String (read-only)Returns the certificate serial number in string format.
sigAlgName: String (read-only)Returns the algorithm used to sign this certificate.
subjectDN: String (read-only)Returns the X.500 distinguished name of the entity this certificate belongs to.
version: Number (read-only)Returns the X.509 certificate version number.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getIssuerDN()Returns the X.500 distinguished name of the entity that signed this certificate.
getNotAfter()Returns the end date of the certificate validity period.
getNotBefore()Returns the start date of the certificate validity period.
getSerialNumber()Returns the certificate serial number in string format.
getSigAlgName()Returns the algorithm used to sign this certificate.
getSubjectDN()Returns the X.500 distinguished name of the entity this certificate belongs to.
getVersion()Returns the X.509 certificate version number.

Methods inherited from class CertificateRef 

toString

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

issuerDN 

issuerDN: String (read-only)

Returns the X.500 distinguished name of the entity that signed this certificate.


notAfter 

notAfter: Date (read-only)

Returns the end date of the certificate validity period.


notBefore 

notBefore: Date (read-only)

Returns the start date of the certificate validity period.


serialNumber 

serialNumber: String (read-only)

Returns the certificate serial number in string format. The serial number is a unique positive integer assigned by the CA to each certificate.


sigAlgName 

sigAlgName: String (read-only)

Returns the algorithm used to sign this certificate. The name follows the format defined in RFC 5280 (e.g., "SHA256withRSA", "SHA384withECDSA").


subjectDN 

subjectDN: String (read-only)

Returns the X.500 distinguished name of the entity this certificate belongs to.


version 

version: Number (read-only)

Returns the X.509 certificate version number.


Method Details 

getIssuerDN() 

getIssuerDN(): String

Returns the X.500 distinguished name of the entity that signed this certificate.

Returns:

  • the issuer's X.500 distinguished name

getNotAfter() 

getNotAfter(): Date

Returns the end date of the certificate validity period.

Returns:

  • the date after which this certificate is not valid

getNotBefore() 

getNotBefore(): Date

Returns the start date of the certificate validity period.

Returns:

  • the date before which this certificate is not valid

getSerialNumber() 

getSerialNumber(): String

Returns the certificate serial number in string format. The serial number is a unique positive integer assigned by the CA to each certificate.

Returns:

  • the certificate serial number as a string

getSigAlgName() 

getSigAlgName(): String

Returns the algorithm used to sign this certificate. The name follows the format defined in RFC 5280 (e.g., "SHA256withRSA", "SHA384withECDSA").

Returns:

  • the signature algorithm name

getSubjectDN() 

getSubjectDN(): String

Returns the X.500 distinguished name of the entity this certificate belongs to.

Returns:

  • the subject's X.500 distinguished name

getVersion() 

getVersion(): Number

Returns the X.509 certificate version number.

Returns:

  • certificate version (typically 1, 2, or 3)

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!