@relaycorp/veraid
    Preparing search index...

    Class Certificate

    X.509 Certificate.

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

    Index

    Constructors

    Properties

    pkijsCertificate: Certificate
    validityPeriod: DatePeriod

    Accessors

    • get serialNumber(): Buffer

      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

    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[]>

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