Page
Library
Module
Module type
Parameter
Class
Class type
Source
Client.MakeSourceinclude sig ... endtype solver = Solver(S).solver = {challenge : challenge;solve_challenge : token:string ->
key_authorization:string ->
[ `host ] Domain_name.t ->
(unit, [ `Msg of string ]) result S.t;}val http_solver :
([ `host ] Domain_name.t ->
prefix:string ->
token:string ->
content:string ->
(unit, [ `Msg of string ]) result S.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 S.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).
val initialise :
?ctx:C.ctx ->
endpoint:string ->
?email:string ->
X509.Private_key.t ->
(t, [> `Msg of string | `HTTP of C.error ]) result S.tinitialise ~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.
val 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.tsign_certificate ~ctx solver t sleep csr orders a certificate for the names in the signing request csr, and solves the requested challenges.