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.

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.

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

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.

toString

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

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. The serial number is a unique positive integer assigned by the CA to each certificate.


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: 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.


getIssuerDN(): String

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

Returns:

  • the issuer's X.500 distinguished name

getNotAfter(): Date

Returns the end date of the certificate validity period.

Returns:

  • the date after which this certificate is not valid

getNotBefore(): Date

Returns the start date of the certificate validity period.

Returns:

  • the date before which this certificate is not valid

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(): 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(): String

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

Returns:

  • the subject's X.500 distinguished name

getVersion(): Number

Returns the X.509 certificate version number.

Returns:

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