addX509Cert

suspend fun addX509Cert(certificate: X509Cert, metadata: TrustMetadata): TrustEntryX509Cert

Adds a standalone X.509 certificate to the trust manager.

Return

The newly created and persisted TrustEntryX509Cert.

Parameters

certificate

The X509Cert to be trusted. Must contain a Subject Key Identifier (SKI).

metadata

Associated metadata (like a display name or icon) for the certificate.

Throws

if the certificate lacks an SKI.

if a certificate with the same SKI is already managed.