eggsampler/acme
is a Go client library implementation for ACME, specifically for use with the Let's Encrypt service.
The library is designed to provide a wrapper over exposed directory endpoints and provide objects in easy to use structures.
A simple certbot-like example is provided in the examples/certbot directory. This code demonstrates account registation, new order submission, fulfilling challenges, finalising an order and fetching the issued certificate chain.
An example of how to use the autocert package is also provided in examples/autocert.
Tests can be run against a local instance of boulder running the config-next
configuration.
This needs to have the chaltestsrv
responding to http01 challenges. This is currently disabled by default and can be enabled by editing test/startservers.py
and ensure chaltestsrv
is running with the flag --http01 :5002
instead of --http01 ""
By default, tests run using the boulder client unless the environment variable ACME_SERVER
is set to pebble
, eg: ACME_SERVER=boulder go test -v
Alternatively, tests can be run against a local instance of pebble running with the PEBBLE_VA_ALWAYS_VALID=1
environment variable.
Currently pebble does not support account key changes or deactivating authorizations, so these tests are disabled.
To run tests using the pebble client the environment variable ACME_SERVER
must be set to pebble
, eg: ACME_SERVER=pebble go test -v