package tls
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=05903e32a63d1b8004a994c978c0051e76d009d43a58acd703114f0bbceed3cd
sha512=068d6469ebabf98d2083350cb707a728fb27fcdd88c66930ee94eccefe59f5202d51a488b6863f01763ae63c5766d440b857932c83acd046fe7bb3844351b348
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
module Unix : sig ... end
Low-level API
High-level API
type ic = Lwt_io.input_channel
type oc = Lwt_io.output_channel
val accept_ext :
Tls.Config.server ->
Lwt_unix.file_descr ->
((ic * oc) * Lwt_unix.sockaddr) Lwt.t
accept_ext 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 :
Tls.Config.own_cert ->
Lwt_unix.file_descr ->
((ic * oc) * Lwt_unix.sockaddr) Lwt.t
accept 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 : Tls.Config.client -> (string * int) -> (ic * oc) Lwt.t
connect_ext 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 : X509_lwt.authenticator -> (string * int) -> (ic * oc) Lwt.t
connect 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
.