package letsencrypt-mirage

  1. Overview
  2. Docs

Parameters

Signature

type nonrec configuration = configuration = {
  1. email : Emile.mailbox option;
  2. certificate_seed : string option;
  3. certificate_key_type : X509.Key_type.t;
  4. certificate_key_bits : int option;
  5. hostname : [ `host ] Domain_name.t;
  6. account_seed : string option;
  7. account_key_type : X509.Key_type.t;
  8. account_key_bits : int option;
}
val request_handler : (Ipaddr.t * int) -> Httpaf.Server_connection.request_handler
val provision_certificate : ?tries:int -> ?production:bool -> configuration -> Http_mirage_client.t -> (Tls.Config.own_cert, [> `Msg of string ]) result Lwt.t
val initialise : ctx:Http_mirage_client.t -> endpoint:Uri.t -> ?email:string -> X509.Private_key.t -> (Letsencrypt.Client.t, [> `Msg of string ]) result Lwt.t

initialise ~ctx ~endpoint ~email priv constructs a Letsencrypt.Client.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:Http_mirage_client.t -> Letsencrypt.Client.solver -> Letsencrypt.Client.t -> (int -> unit Lwt.t) -> X509.Signing_request.t -> (X509.Certificate.t list, [> `Msg of string ]) result Lwt.t

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

OCaml

Innovation. Community. Security.