ExAcme (ExAcme v0.2.0)
View SourceExAcme is an ACME protocol client for managing SSL certificates.
It provides functionalities to interact with the ACME server, including generating keys, sending ACME requests, and handling directory and nonce information.
Features
- Start and manage the ExAcme client agent.
- Fetch directory information and terms of service.
- Send signed ACME requests.
- Handle nonce refreshing automatically.
Use the client to interact with ACME endpoints.
Summary
Functions
Returns a specification to start this module under a supervisor.
Retrieves the directory information from the client.
Checks if an external account is required.
Retrieves the profiles from the ACME directory.
Sends an ACME request.
Starts the ExAcme client agent with the given options.
Retrieves the terms of service URL from the ACME directory information.
Types
@type client() :: Agent.agent()
Client process holding directory cache and state
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec directory(Agent.agent()) :: map()
Retrieves the directory information from the client.
Parameters
client
- The pid or name of the ExAcme client agent.
@spec external_account_required?(Agent.agent()) :: boolean()
Checks if an external account is required.
Parameters
client
- The pid or name of the ExAcme client agent.
@spec profiles(Agent.agent()) :: [map()]
Retrieves the profiles from the ACME directory.
Parameters
client
- The pid or name of the ExAcme client agent.
@spec send_request(ExAcme.Request.t(), ExAcme.AccountKey.t(), Agent.agent()) :: {:ok, map()} | {:error, any()}
Sends an ACME request.
Parameters
acme_request
- The ACME request to send.account_key
- The account key for signing.client
- The ExAcme client agent.
Starts the ExAcme client agent with the given options.
Options
:directory_url
- The URL of the ACME directory. The value can be:lets_encrypt
or:lets_encrypt_staging
to use the Let's Encrypt production or staging directory URL or a custom directory URL.:finch
- The module name or pid of the Finch HTTP client to use.- Other options to pass to
Agent
like:name
.
@spec terms_of_service(Agent.agent()) :: String.t()
Retrieves the terms of service URL from the ACME directory information.
Parameters
client
- The pid or name of the ExAcme client agent.