package letsencrypt
Module Letsencrypt.ClientSource
ACME Client.
This module provides client commands. Note: right now this module implements only the strict necessary in order to register an account, solve http-01 challenges provided by the CA, and fetch the certificate. This means that you will be able to maintain your server with this.
val http_solver :
([ `host ] Domain_name.t ->
prefix:string ->
token:string ->
content:string ->
(unit, [ `Msg of string ]) result Lwt.t) ->
solverhttp_solver (fun domain ~prefix ~token ~content) is a solver for http-01 challenges. The provided function should return Ok () once the web server at domain serves content as prefix/token: a GET request to http://domain/prefix/token should return content. The prefix is ".well-known/acme-challenge".
print_http outputs the HTTP challenge solution, and waits for user input before continuing with ACME.
val alpn_solver :
?key_type:X509.Key_type.t ->
?bits:int ->
([ `host ] Domain_name.t ->
alpn:string ->
X509.Private_key.t ->
X509.Certificate.t ->
(unit, [ `Msg of string ]) result Lwt.t) ->
solveralpn_solver ~key_type ~bits (fun domain ~alpn private_key certificate) is a solver for tls-alpn-01 challenges. The provided function should return Ok () once the TLS server at domain serves the self-signed certificate (with private_key) under the ALPN alpn ("acme-tls/1"). The key_type and bits are used for the self-signed certificate, while bits is only relevant if key_type is `RSA (default: RSA with 2048 bits).
print_alpn outputs the ALPN challenge solution, and waits for user input before continuing with ACME.