package tls

  1. Overview
  2. Docs
Transport Layer Security purely in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

tls-0.10.4.tbz
sha256=24d5f7200ceb526bc8d1513c72dbe641a15012d3b0bba3387b85aaee9e052317
sha512=c0e246c3e5e81cb8ba6f171869694d83ae948757098b144009c7e357b3deb722b42393270a20434f1d2c82769ff519c64aa6374c471b04c38d39a5729bf60a21

doc/tls.lwt/Tls_lwt/index.html

Module Tls_lwt

Effectful operations using Lwt for pure TLS.

The pure TLS is state and buffer in, state and buffer out. This module uses Lwt for communication over the network.

This module implements a high-level API and a low-level API (in Unix). Most applications should use the high-level API described below.

exception Tls_alert of Tls.Packet.alert_type

Tls_alert exception received from the other endpoint

exception Tls_failure of Tls.Engine.failure

Tls_failure exception while processing incoming data

type tracer = Sexplib.Sexp.t -> unit

tracing of TLS sessions

module Unix : sig ... end

Low-level API

High-level API

val accept_ext : ?trace:tracer -> Tls.Config.server -> Lwt_unix.file_descr -> ((ic * oc) * Lwt_unix.sockaddr) Lwt.t

accept_ext ?trace server fd is (ic, oc), sockaddr, the input and output channel from an accepted connection on the given fd, after upgrading to TLS using the server configuration.

val accept : ?trace:tracer -> Tls.Config.own_cert -> Lwt_unix.file_descr -> ((ic * oc) * Lwt_unix.sockaddr) Lwt.t

accept ?trace own_cert fd is (ic, oc), sockaddr, the input and output channel from the accepted connection on fd, using the default configuration with the given own_cert.

val connect_ext : ?trace:tracer -> Tls.Config.client -> (string * int) -> (ic * oc) Lwt.t

connect_ext ?trace client (host, port) is ic, oc, the input and output channel of a TLS connection to host on port using the client configuration.

val connect : ?trace:tracer -> X509_lwt.authenticator -> (string * int) -> (ic * oc) Lwt.t

connect ?trace authenticator (host, port) is ic, oc, the input and output channel of a TLS connection to host on port using the default configuration and the authenticator.

val of_t : ?close:(unit -> unit Lwt.t) -> Unix.t -> ic * oc

of_t t is ic, oc, the input and output channel. close defaults to !Unix.close.

OCaml

Innovation. Community. Security.

On This Page
  1. High-level API