PkiEnvironment

open class PkiEnvironment : PkiEnvironmentProtocol, @unchecked Sendable

The PKI environment used for certificate management during X509 credential acquisition.

  • Add a PEM-encoded certificate as an intermediate certificate.

    Declaration

    Swift

    open func addIntermediateCert(certPem: String) async throws
  • Add a PEM-encoded certificate as a trust anchor.

    NOTE: currently we only support storing a single trust anchor, calling this method multiple times will overwrite any previously added trust anchor.

    Declaration

    Swift

    open func addTrustAnchor(certPem: String) async throws
  • init(hooks:database:) Asynchronous, from WireCoreCrypto

    Create a new PKI environment.

    Declaration

    Swift

    public convenience init(hooks: PkiEnvironmentHooks, database: Database) async throws

    Parameters

    hooks

    implementation of the PKI environment hooks

    database

    the database to use for this environment