PkiEnvironment
open class PkiEnvironment : PkiEnvironmentProtocol, @unchecked Sendable
The PKI environment used for certificate management during X509 credential acquisition.
-
addIntermediateCert(certPem:Asynchronous) Add a PEM-encoded certificate as an intermediate certificate.
Declaration
Swift
open func addIntermediateCert(certPem: String) async throws -
addTrustAnchor(certPem:Asynchronous) Add a PEM-encoded certificate as a trust anchor.
Declaration
Swift
open func addTrustAnchor(certPem: String) async throws -
getTrustAnchors()AsynchronousGet all trust anchors as PEM-encoded certificates.
Declaration
Swift
open func getTrustAnchors() async throws -> [String] -
removeTrustAnchor(fingerprint:Asynchronous) 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
open func removeTrustAnchor(fingerprint: Data) async throws -
init(hooks:Asynchronous, from WireCoreCryptodatabase: ) Create a new PKI environment.
Declaration
Swift
public convenience init(hooks: PkiEnvironmentHooks, database: Database) async throwsParameters
hooksimplementation of the PKI environment hooks
databasethe database to use for this environment