Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...
    Index

    Constructors

    Properties

    baseExtensions?: {
        authorityKeyIdentifier?: { contains: Buffer; type: "context"; value: 0 };
        basicConstraints?: [ca: boolean, pathLenConstraint?: bigint];
        subjectKeyIdentifier?: Buffer;
    }

    Basic Extensions

    Type declaration

    • OptionalauthorityKeyIdentifier?: { contains: Buffer; type: "context"; value: 0 }

      Authority Key Identifier

    • OptionalbasicConstraints?: [ca: boolean, pathLenConstraint?: bigint]

      Basic Constraints

    • OptionalsubjectKeyIdentifier?: Buffer

      Subject Key Identifier

    chain?: Certificate[]

    Chain, if a store is provided

    issuer: string

    The Issuer DN of the certificate as a string --- for informational purposes only

    issuerDN: ASN1Set[]

    The complete IssuerDN

    moment: null | Date

    The moment at which the certificate was validated

    notAfter: Date

    The timestamp at which the certificate expires

    notBefore: Date

    The timestamp at which the certificate becomes valid

    serial: bigint

    The serial number of the certificate

    subject: string

    The Subject DN of the certificate as a string --- for informational purposes only

    subjectDN: ASN1Set[]

    The complete SubjectDN

    subjectPublicKey: Account

    The Subject of the certificate as a KeetaNet Account, derived from the public key in the certificate

    Builder: typeof CertificateBuilder = CertificateBuilder

    The Certificate Builder

    Accessors

    • get trusted(): boolean

      If this certificate can be trusted to have been validated to a trusted Root CA

      Returns boolean

    Methods

    • Assert that the certificate is valid at a given moment

      Parameters

      • Optionalmoment: null | Date

      Returns void

    • Check if the certificate is issued by a given issuer

      Parameters

      Returns boolean

    • Check if the certificate is issued by a given issuer

      Parameters

      Returns { issued: true } | { issued: false; reason: string }

    • Check if the certificate is valid at a given moment

      Parameters

      • Optionalmoment: null | Date

      Returns boolean

    • Check if the certificate is valid at a given moment

      Parameters

      • Optionalmoment: null | Date
      • Optionalreason: false

      Returns boolean

    • Check if the certificate is valid at a given moment

      Parameters

      • Optionalmoment: null | Date
      • Optionalreason: true

      Returns { valid: true } | { reason: string; valid: false }

    • Compare the certificate with another certificate and return true if they are the same

      Parameters

      Returns boolean

    • Finalize construction of the certificate -- if this method is replaced in a subclass, remember to call it at the end of the subclass constructor or the certificate will not be fully constructed

      Returns void

    • Compute a hash of the certificate

      Returns string

    • Verifies that a certificate is self-signed

      Returns boolean

    • Process an extension -- returns true if the extension was processed

      This is intended to be overridden by subclasses for processing custom extensions

      Parameters

      • id: string
      • value: ArrayBuffer

      Returns boolean

    • Process remaining extensions

      Returns void

    • Get the certificate as a DER encoded ArrayBuffer

      Returns ArrayBuffer

    • Get a JSON representation of the certificate

      Parameters

      • includeChain: boolean = false

      Returns any

    • Get the certificate as a PEM encoded string

      Returns string

    • Is a certificate object?

      Parameters

      • value: unknown

      Returns value is Certificate