ExIncus.Certificates (ex_incus v1.0.0)

Copy Markdown

Manage the server's trust store (trusted client certificates).

Summary

Functions

Adds a certificate to the trust store from a CertificatesPost params map, e.g. %{"certificate" => base64_der, "name" => "ci", "type" => "client"} (use "trust_token" => token when authenticating with a token instead).

Removes a certificate from the trust store.

Fetches a certificate by fingerprint.

Lists trusted certificates (full objects by default).

Types

result()

@type result() :: {:ok, term()} | {:error, ExIncus.Error.t()}

Functions

create(client, params, opts \\ [])

@spec create(ExIncus.Client.t(), map(), keyword()) :: result()

Adds a certificate to the trust store from a CertificatesPost params map, e.g. %{"certificate" => base64_der, "name" => "ci", "type" => "client"} (use "trust_token" => token when authenticating with a token instead).

delete(client, fingerprint, opts \\ [])

@spec delete(ExIncus.Client.t(), String.t(), keyword()) :: result()

Removes a certificate from the trust store.

get(client, fingerprint, opts \\ [])

@spec get(ExIncus.Client.t(), String.t(), keyword()) :: result()

Fetches a certificate by fingerprint.

list(client, opts \\ [])

@spec list(
  ExIncus.Client.t(),
  keyword()
) :: result()

Lists trusted certificates (full objects by default).