summaryrefslogtreecommitdiff
path: root/gemini/tlsUtils.mli
blob: a0d89ff7a3a7565665a48657019d5e9154e657e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module type TLS_UTILS =
sig
  type authenticator = X509_lwt.authenticator Lwt.t
  type ciphers = Tls.Ciphersuite.ciphersuite list
  type own_cert = Tls.Config.own_cert

  val null_auth : authenticator

  val ca : Lwt_io.file_name -> authenticator

  val self_sign : ?bits:int -> ?days:int
    -> X509.Distinguished_name.t
    -> (Tls.Config.certchain, string) result

  val connect : authenticator:authenticator -> ?peer_name:string ->
    ?ciphers:ciphers -> ?own_cert:own_cert -> string * int
    -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t
end

module TlsUtils : TLS_UTILS