ExAcme.Certificate (ExAcme v0.1.0)

View Source

Handles ACME certificate operations.

Provides functionalities to fetch certificates and generate Certificate Signing Requests (CSRs).

Summary

Functions

Generates a Certificate Signing Request (CSR) from an order and a private key.

Fetches a certificate chain from the ACME server.

Functions

csr_from_order(order, private_key)

@spec csr_from_order(ExAcme.Order.t(), X509.PrivateKey.t()) :: X509.CSR.t()

Generates a Certificate Signing Request (CSR) from an order and a private key.

Parameters

  • order - The ACME order.
  • private_key - The private key to sign the CSR and associate with the certificate.

Returns

  • %X509.CSR{} struct.

fetch(url, account_key, client)

@spec fetch(String.t(), ExAcme.AccountKey.t(), ExAcme.client()) ::
  {:ok, [X509.Certificate.t()]} | {:error, term()}

Fetches a certificate chain from the ACME server.

Parameters

  • url - The certificate URL.
  • account_key - The account key for authentication.
  • client - The ExAcme client agent.

Returns

  • {:ok, certificates} on success.
  • {:error, reason} on failure.