package ldp_tls

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Performing queries using Cohttp and Tls.

type Ldp.Types.error +=
  1. | Tls_error of string

Errors from the Tls library.

val tls_error : string -> 'a

tls_error msg calls Ldp.Types.error with Tls_error msg.

val tls_fail : string -> 'a Lwt.t

Same as tls_error but uses Ldp.Types.fail instead.

val make : ?cache_impl:(module Ldp.Http.Cache) -> ?cache_dir:string -> ?authenticator:X509.Authenticator.t -> ?cert:(string * string) -> dbg:(string -> unit Lwt.t) -> unit -> (module Ldp.Http.Http) Lwt.t

make ?cache_dir ?cache_impl ?authenticator ~cert:(pemfile, privkeyfile) ~dbg creates a new module to perform HTTP queries. dbg is a debugging function. Optional arguments:

  • cache_impl indicates a cache implementation to use,
  • cache indicates a directory to use for cache, if no cache_impl is provided. If none is provided, no cache is used.
  • authenticator indicates the way to authentify a server; default is no authentification.
  • cert is a pair (certificate file, key file) to authenticate client in SSL.
OCaml

Innovation. Community. Security.