Packages

class X509Certificate extends cryptoMod.X509Certificate with _TransferListItem

Encapsulates an X509 certificate and provides read-only access to its information.

js const { X509Certificate } = await import('crypto');

const x509 = new X509Certificate('{... pem encoded cert ...}');

console.log(x509.subject);

Annotations
@JSType() @JSImport("node:crypto", "X509Certificate") @native()
Since

v15.6.0

Linear Supertypes
_TransferListItem, cryptoMod.X509Certificate, StObject, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. X509Certificate
  2. _TransferListItem
  3. X509Certificate
  4. StObject
  5. Object
  6. Any
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new X509Certificate(buffer: BinaryLike)
  2. new X509Certificate()
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val ca: Boolean

    Will be \true\ if this is a Certificate Authority (ca) certificate.

    Will be \true\ if this is a Certificate Authority (ca) certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  6. def checkEmail(email: String, options: X509CheckOptions): UndefOr[String]
    Definition Classes
    X509Certificate
  7. def checkEmail(email: String): UndefOr[String]

    Checks whether the certificate matches the given email address.

    Checks whether the certificate matches the given email address.

    returns

    Returns email if the certificate matches, undefined if it does not.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  8. def checkHost(name: String, options: X509CheckOptions): UndefOr[String]
    Definition Classes
    X509Certificate
  9. def checkHost(name: String): UndefOr[String]

    Checks whether the certificate matches the given host name.

    Checks whether the certificate matches the given host name.

    returns

    Returns name if the certificate matches, undefined if it does not.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  10. def checkIP(ip: String, options: X509CheckOptions): UndefOr[String]
    Definition Classes
    X509Certificate
  11. def checkIP(ip: String): UndefOr[String]

    Checks whether the certificate matches the given IP address (IPv4 or IPv6).

    Checks whether the certificate matches the given IP address (IPv4 or IPv6).

    returns

    Returns ip if the certificate matches, undefined if it does not.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  12. def checkIssued(otherCert: cryptoMod.X509Certificate): Boolean

    Checks whether this certificate was issued by the given otherCert.

    Checks whether this certificate was issued by the given otherCert.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  13. def checkPrivateKey(privateKey: KeyObject): Boolean

    Checks whether the public key for this certificate is consistent with the given private key.

    Checks whether the public key for this certificate is consistent with the given private key.

    privateKey

    A private key.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. val fingerprint: String

    The SHA-1 fingerprint of this certificate.

    The SHA-1 fingerprint of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  18. val fingerprint256: String

    The SHA-256 fingerprint of this certificate.

    The SHA-256 fingerprint of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. val infoAccess: String

    The information access content of this certificate.

    The information access content of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  25. val issuer: String

    The issuer identification included in this certificate.

    The issuer identification included in this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  26. val issuerCertificate: UndefOr[cryptoMod.X509Certificate]

    The issuer certificate or undefined if the issuer certificate is not available.

    The issuer certificate or undefined if the issuer certificate is not available.

    Definition Classes
    X509Certificate
    Since

    v15.9.0

  27. val keyUsage: Array[String]

    An array detailing the key usages for this certificate.

    An array detailing the key usages for this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  32. val publicKey: KeyObject

    The public key KeyObject for this certificate.

    The public key KeyObject for this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  33. val raw: Buffer

    A Buffer containing the DER encoding of this certificate.

    A Buffer containing the DER encoding of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  34. val serialNumber: String

    The serial number of this certificate.

    The serial number of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  35. val subject: String

    The complete subject of this certificate.

    The complete subject of this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  36. val subjectAltName: String

    The subject alternative name specified for this certificate.

    The subject alternative name specified for this certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def toJSON(): String

    There is no standard JSON encoding for X509 certificates.

    There is no standard JSON encoding for X509 certificates. ThetoJSON() method returns a string containing the PEM encoded certificate.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  39. def toLegacyObject(): PeerCertificate

    Returns information about this certificate using the legacy certificate object encoding.

    Returns information about this certificate using the legacy certificate object encoding.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  40. def toLocaleString(): String
    Definition Classes
    Object
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. val validFrom: String

    The date/time from which this certificate is considered valid.

    The date/time from which this certificate is considered valid.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  43. val validTo: String

    The date/time until which this certificate is considered valid.

    The date/time until which this certificate is considered valid.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  44. def valueOf(): Any
    Definition Classes
    Object
  45. def verify(publicKey: KeyObject): Boolean

    Verifies that this certificate was signed by the given public key.

    Verifies that this certificate was signed by the given public key. Does not perform any other validation checks on the certificate.

    publicKey

    A public key.

    Definition Classes
    X509Certificate
    Since

    v15.6.0

  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from _TransferListItem

Inherited from StObject

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped