X509Certificate

@JSImport("crypto", "X509Certificate") @native @JSType class X509Certificate() extends StObject with _TransferListItem
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(buffer: BinaryLike)

Concrete methods

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 email if the certificate matches,undefined if it does not.

def checkEmail(email: String, options: X509CheckOptions): UndefOr[String]
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 name if the certificate matches, undefined if it does not.

def checkHost(name: String, options: X509CheckOptions): UndefOr[String]
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 ip if the certificate matches, undefined if it does not.

def checkIP(ip: String, options: X509CheckOptions): UndefOr[String]
def checkIssued(otherCert: X509Certificate): Boolean

Checks whether this certificate was issued by the given otherCert.

Checks whether this certificate was issued by the given otherCert.

def checkPrivateKey(privateKey: KeyObject): Boolean

Checks whether this certificate was issued by the given otherCert.

Checks whether this certificate was issued by the given otherCert.

def toJSON(): String

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

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

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

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

def verify(publicKey: KeyObject): Boolean

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

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

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

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.

val fingerprint: String

The SHA-1 fingerprint of this certificate.

The SHA-1 fingerprint of this certificate.

val fingerprint256: String

The SHA-256 fingerprint of this certificate.

The SHA-256 fingerprint of this certificate.

val infoAccess: String

The information access content of this certificate.

The information access content of this certificate.

val issuer: String

The issuer identification included in this certificate.

The issuer identification included in this certificate.

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

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

val keyUsage: Array[String]

An array detailing the key usages for this certificate.

An array detailing the key usages for this certificate.

The public key for this certificate.

The public key for this certificate.

val raw: Buffer

A Buffer containing the DER encoding of this certificate.

A Buffer containing the DER encoding of this certificate.

val serialNumber: String

The serial number of this certificate.

The serial number of this certificate.

val subject: String

The complete subject of this certificate.

The complete subject of this certificate.

val subjectAltName: String

The subject alternative name specified for this certificate.

The subject alternative name specified for this certificate.

val validFrom: String

Returns the PEM-encoded certificate.

Returns the PEM-encoded certificate.

val validTo: String

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

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