PkiEnvironmentProtocol

public protocol PkiEnvironmentProtocol : AnyObject, Sendable

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

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

    Declaration

    Swift

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

    Declaration

    Swift

    func addTrustAnchor(certPem: String) async throws
  • getTrustAnchors() Asynchronous

    Get all trust anchors as PEM-encoded certificates.

    Declaration

    Swift

    func getTrustAnchors() async throws -> [String]
  • Remove a trust anchor by providing the certificates Subject Public Key Info (SPKI) fingerprint as bytes. Trying to remove trust anchor that doesn’t exist in the database will just succeed.

    Declaration

    Swift

    func removeTrustAnchor(fingerprint: Data) async throws