X.509 Certificate.

This is a high-level class on top of PKI.js Certificate, to make the use of Relaynet certificates easy and safe.

Accessors

Methods

  • Return the certification path (aka "certificate chain") if this certificate can be trusted.

    Parameters

    • intermediateCaCertificates: readonly Certificate[]

      The alleged chain for the certificate

    • trustedCertificates: readonly Certificate[]

      The collection of certificates that are actually trusted

    Returns Promise<readonly Certificate[]>

    Throws

    CertificateError when this certificate is not on a certificate path from a CA in trustedCertificates

  • Return serial number.

    This doesn't return a number or BigInt because the serial number could require more than 8 octets (which is the maximum number of octets required to represent a 64-bit unsigned integer).

    Returns Buffer

Generated using TypeDoc