package tls
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ca889a1593780b896be5139037865e7de21e620088b2c0e9d3d65565ddbef769
sha512=da21f3d1fc5e02feac774be8a1568e9acb2218d0ffdbd8551a845210969d16ce537a46badb03fb424dc0d3f31593bd0cc3f0d16b80a7e02c7ad287f8dd1ea977
doc/tls.lwt/Tls_lwt/index.html
Module Tls_lwt
Source
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.
Tls_alert
exception received from the other endpoint
Tls_failure
exception while processing incoming data
High-level API
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
.
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.
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
.