Hierarchy (view full)

Constructors

  • Parameters

    • options: CertificateManagerOptions

    Returns CertificateManager

Properties

folderPoolingInterval: number
state: CertificateManagerState
untrustUnknownCertificate: boolean

Accessors

  • get configFile(): string
  • Returns string

  • get crlFolder(): string
  • Returns string

  • get issuersCertFolder(): string
  • Returns string

  • get issuersCrlFolder(): string
  • Returns string

  • get privateKey(): string
  • Returns string

  • get randomFile(): string
  • Returns string

  • get rejectedFolder(): string
  • Returns string

  • get rootDir(): string
  • Returns string

  • get trustedFolder(): string
  • Returns string

Methods

  • Parameters

    • certificate: Buffer
    • isIssuer: boolean
    • level: number
    • options: VerifyCertificateOptions

    Returns Promise<VerificationStatus>

  • Parameters

    • certificate: Buffer
    • Optionalvalidate: boolean
    • OptionaladdInTrustList: boolean

    Returns Promise<VerificationStatus>

  • Parameters

    • crl: Buffer

    Returns Promise<VerificationStatus>

  • Parameters

    • params: CreateSelfSignCertificateParam

    Returns Promise<string>

  • Parameters

    • params: CreateSelfSignCertificateParam
    • callback: ((err: null | Error, certificateSigningRequestFilename?: string) => void)
        • (err, certificateSigningRequestFilename?): void
        • Parameters

          • err: null | Error
          • OptionalcertificateSigningRequestFilename: string

          Returns void

    Returns void

  • create a self-signed certificate for the CertificateManager private key

    Parameters

    • params: CreateSelfSignCertificateParam1

    Returns Promise<void>

  • Parameters

    • params: CreateSelfSignCertificateParam1
    • callback: ErrorCallback

    Returns void

  • Returns Promise<void>

  • find the issuer certificate among the trusted issuer certificates.

    The findIssuerCertificate method is an asynchronous method that attempts to find the issuer certificate for a given certificate from the list of issuer certificate declared in the PKI

    • If the certificate is self-signed, it returns the certificate itself.

    • If the certificate has no extension 3, it is assumed to be generated by an old system, and a null value is returned.

    • the method checks both issuer and trusted certificates and returns the appropriate issuercertificate, if found. If multiple matching certificates are found, a warning is logged to the console.

    Parameters

    • certificate: Buffer

    Returns Promise<null | Buffer>

  • returns the certificate status trusted/rejected

    Parameters

    • certificate: Buffer

    Returns Promise<CertificateStatus>

  • Parameters

    • certificate: Buffer
    • callback: ((err: null | Error, status?: CertificateStatus) => void)
        • (err, status?): void
        • Parameters

          • err: null | Error
          • Optionalstatus: CertificateStatus

          Returns void

    Returns void

  • Returns Promise<void>

  • Parameters

    • callback: ((err?: Error) => void)
        • (err?): void
        • Parameters

          • Optionalerr: Error

          Returns void

    Returns void

  • Parameters

    • certificate: Buffer
    • OptionalissuerCertificate: null | Buffer

    Returns Promise<VerificationStatus>

  • Parameters

    • certificate: Buffer
    • callback: ((err: null | Error, trustedStatus: string) => void)
        • (err, trustedStatus): void
        • Parameters

          • err: null | Error
          • trustedStatus: string

          Returns void

    Returns void

  • Parameters

    • certificate: Buffer

    Returns Promise<string>

  • Parameters

    • certificate: Buffer

    Returns Promise<void>

  • Parameters

    • certificate: Buffer
    • callback: ErrorCallback

    Returns void

  • Parameters

    • certificate: Buffer

    Returns Promise<void>

  • Parameters

    • certificate: Buffer
    • callback: ErrorCallback

    Returns void

  • Verify certificate validity

    Parameters

    • certificate: Buffer
    • Optionaloptions: VerifyCertificateOptions

    Returns Promise<VerificationStatus>

    verifyCertificate

  • Parameters

    • certificate: Buffer
    • callback: ((err: null | Error, status?: VerificationStatus) => void)
        • (err, status?): void
        • Parameters

          • err: null | Error
          • Optionalstatus: VerificationStatus

          Returns void

    Returns void

  • Parameters

    • certificate: Buffer
    • options: VerifyCertificateOptions

    Returns Promise<VerificationStatus>

  • Type Parameters

    • T

    Parameters

    • action: (() => Promise<T>)
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>