package tls
Install
Dune Dependency
Authors
Maintainers
Sources
md5=fa5d1ae3e5c3ee09b515550f8d2ecdfa
sha256=36a61fcd4b08ae099538d9e71e8d24f518f5be4f735d0384c0e19da0496dbfb4
sha512=b36d2df5d8f5e1faffc26dbf486f59c90678f7dbd809cc770fd0f2fbb4b015fd634c50543be8522af0cbafd85bebbcb34579a34bdf149d5d8ed5fa253240db24
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.
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 :
?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
.
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
.