···77type t = [ `Mock_tls | Eio.Flow.two_way_ty | Eio.Resource.close_ty ] r
8899val create_pair : unit -> t * t
1010-(** Create a pair of sockets [client, server], such that writes to one can be
1111- read from the other. *)
1010+(** [create_pair ()] is a pair of sockets (client, server), such that writes to
1111+ one can be read from the other. *)
12121313val transmit : t -> transmit_amount -> unit
+12-10
lib/config.mli
···106106 parameters. Returns an error if the configuration is invalid. *)
107107108108val peer : client -> [ `host ] Domain_name.t -> client
109109-(** [peer client name] is [client] with [name] as [peer_name] *)
109109+(** [peer client name] is [client] with [name] as [peer_name]. *)
110110111111(** {1 Note on ALPN protocol selection}
112112···123123124124val default_signature_algorithms : signature_algorithm list
125125(** [default_signature_algorithms] is a list of signature algorithms used by
126126- default *)
126126+ default. *)
127127128128val supported_signature_algorithms : signature_algorithm list
129129(** [supported_signature_algorithms] is a list of supported signature algorithms
130130- by this library *)
130130+ by this library. *)
131131132132val min_dh_size : int
133133-(** [min_dh_size] is minimal diffie hellman group size in bits (currently 1024)
133133+(** [min_dh_size] is minimal diffie hellman group size in bits (currently 1024).
134134*)
135135136136val supported_groups : group list
···142142 otherwise. *)
143143144144val min_rsa_key_size : int
145145-(** [min_rsa_key_size] is minimal RSA modulus key size in bits (currently 1024)
145145+(** [min_rsa_key_size] is minimal RSA modulus key size in bits (currently 1024).
146146*)
147147148148(** Cipher selection *)
···178178(** {1 Internal use only} *)
179179180180val of_client : client -> config
181181-(** [of_client client] is a client configuration for [client] *)
181181+(** [of_client client] is a client configuration for [client]. *)
182182183183val of_server : server -> config
184184-(** [of_server server] is a server configuration for [server] *)
184184+(** [of_server server] is a server configuration for [server]. *)
185185186186val with_authenticator : config -> X509.Authenticator.t -> config
187187-(** [with_authenticator config auth] is [config] with [auth] as [authenticator]
187187+(** [with_authenticator config auth] is [config] with [auth] as [authenticator].
188188*)
189189190190val with_own_certificates : config -> own_cert -> config
191191-(** [with_own_certificates config cert] is [config] with [cert] as [own_cert] *)
191191+(** [with_own_certificates config cert] is [config] with [cert] as [own_cert].
192192+*)
192193193194val with_acceptable_cas : config -> X509.Distinguished_name.t list -> config
194194-(** [with_acceptable_cas config cas] is [config] with [cas] as [accepted_cas] *)
195195+(** [with_acceptable_cas config cas] is [config] with [cas] as [accepted_cas].
196196+*)
+5-5
lib/engine.mli
···42424343val client : Config.client -> state * string
4444(** [client client] is [tls * out] where [tls] is the initial state, and [out]
4545- the initial client hello *)
4545+ the initial client hello. *)
46464747val server : Config.server -> state
4848-(** [server server] is [tls] where [tls] is the initial server state *)
4848+(** [server server] is [tls] where [tls] is the initial server state. *)
49495050(** {1 Protocol failures} *)
5151···115115116116val handle_tls : state -> string -> ret
117117(** [handle_tls state buffer] is [ret], depending on incoming [state] and
118118- [buffer], the result is the appropriate {!ret} *)
118118+ [buffer], the result is the appropriate {!ret}. *)
119119120120val handshake_in_progress : state -> bool
121121-(** [handshake_in_progrss state] is a predicate which indicates whether there is
122122- a handshake in progress or scheduled. *)
121121+(** [handshake_in_progress state] is a predicate which indicates whether there
122122+ is a handshake in progress or scheduled. *)
123123124124val send_application_data : state -> string list -> (state * string) option
125125(** [send_application_data tls outs] is [Some (tls', out)] where [tls'] is the
+2-1
lib/handshake_crypto.mli
···2626 string ->
2727 string ->
2828 string
2929-(** [pseudo_random_function version cipher length secret label seed] *)
2929+(** [pseudo_random_function version cipher length secret label seed] is the
3030+ computed pseudo-random output. *)
···7878 ?host:[ `host ] Domain_name.t ->
7979 Unix.file_descr ->
8080 t
8181-(** [client_of_flow client ~host fd] is [t], after client-side TLS handshake of
8181+(** [client_of_fd client ~host fd] is [t], after client-side TLS handshake of
8282 [fd] using [client] configuration and [host].
83838484 @raise End_of_file if we are not able to complete the handshake. *)
···9191 @raise End_of_file if we are not able to complete the handshake. *)
92929393val connect : X509.Authenticator.t -> string * int -> t
9494-(** [connect authenticator (host, port)] is [t], a connected TLS connection to
9595- [host] on [port] using the default configuration and the [authenticator]. *)
9494+(** [connect authenticator addr] is [t], a connected TLS connection to [addr]
9595+ using the default configuration and the [authenticator]. *)
96969797val epoch : t -> Tls.Core.epoch_data option
9898(** [epoch t] returns [epoch], which contains information of the active session.