package letsencrypt

  1. Overview
  2. Docs

Module Client.MakeSource

Parameters

module S : S
module C : Client with type 'a t = 'a S.t

Signature

include sig ... end
Sourcetype solver = Solver(S).solver = {
  1. challenge : challenge;
  2. solve_challenge : token:string -> key_authorization:string -> [ `host ] Domain_name.t -> (unit, [ `Msg of string ]) result S.t;
}
Sourceval http_solver : ([ `host ] Domain_name.t -> prefix:string -> token:string -> content:string -> (unit, [ `Msg of string ]) result S.t) -> solver

http_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".

Sourceval print_http : solver

print_http outputs the HTTP challenge solution, and waits for user input before continuing with ACME.

Sourceval 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 S.t) -> solver

alpn_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).

Sourceval print_alpn : solver

print_alpn outputs the ALPN challenge solution, and waits for user input before continuing with ACME.

Sourceval initialise : ?ctx:C.ctx -> endpoint:string -> ?email:string -> X509.Private_key.t -> (t, [> `Msg of string | `HTTP of C.error ]) result S.t

initialise ~ctx ~endpoint ~email priv constructs a t by looking up the directory and account of priv at endpoint. If no account is registered yet, a new account is created with contact information of email. The terms of service are agreed on.

Sourceval sign_certificate : ?ctx:C.ctx -> solver -> t -> (int -> unit S.t) -> X509.Signing_request.t -> (X509.Certificate.t list, [> `Msg of string | `HTTP of C.error ]) result S.t

sign_certificate ~ctx solver t sleep csr orders a certificate for the names in the signing request csr, and solves the requested challenges.