package shuttle_ssl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val upgrade_server_connection : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?name:string -> ?allowed_ciphers:[ `Only of string list | `Openssl_default | `Secure ] -> ?ca_file:string -> ?ca_path:string -> ?verify_modes:Async_ssl.Verify_mode.t list -> crt_file:string -> key_file:string -> f: (Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> 'a Async.Deferred.t) -> Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> 'a Async.Deferred.t

upgrade_server_connection performs TLS negotiation and if it succeeds, applies f to the new encrypted channels. When the deferred returned by f resolves, the TLS connection is shutdown, and the channels are closed.

val listen : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?name:string -> ?allowed_ciphers:[ `Only of string list | `Openssl_default | `Secure ] -> ?ca_file:string -> ?ca_path:string -> ?verify_modes:Async_ssl.Verify_mode.t list -> ?max_connections:int -> ?max_accepts_per_batch:int -> ?backlog:int -> ?socket: ([ `Unconnected ], [< Async.Socket.Address.t ] as 'address) Async.Socket.t -> crt_file:string -> key_file:string -> on_handler_error:[ `Call of 'address -> exn -> unit | `Ignore | `Raise ] -> ('address, 'listening_on) Async.Tcp.Where_to_listen.t -> f: ('address -> Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> unit Async.Deferred.t) -> ('address, 'listening_on) Async.Tcp.Server.t Async.Deferred.t

listen accepts new TCP connections, performs TLS negotiation and then calls f with the encrypted channels. Once the deferred returned by f resolves, the connection is shutdown.

val upgrade_client_connection : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?name:string -> ?hostname:string -> ?allowed_ciphers:[ `Only of string list | `Openssl_default | `Secure ] -> ?ca_file:string -> ?ca_path:string -> ?crt_file:string -> ?key_file:string -> ?verify_modes:Async_ssl.Verify_mode.t list -> ?session:Async_ssl.Ssl.Session.t -> f: (Async_ssl.Ssl.Connection.t -> Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> 'a Async.Deferred.t) -> Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> 'a Async.Deferred.t
val with_connection : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?name:string -> ?hostname:string -> ?allowed_ciphers:[ `Only of string list | `Openssl_default | `Secure ] -> ?ca_file:string -> ?ca_path:string -> ?crt_file:string -> ?key_file:string -> ?verify_modes:Async_ssl.Verify_mode.t list -> ?session:Async_ssl.Ssl.Session.t -> ?interrupt:unit Async.Deferred.t -> ?timeout:Core.Time.Span.t -> ?input_buffer_size:int -> ?output_buffer_size:int -> f: (Async_ssl.Ssl.Connection.t -> Shuttle.Input_channel.t -> Shuttle.Output_channel.t -> 'a Async.Deferred.t) -> [< Async.Socket.Address.t ] Async.Tcp.Where_to_connect.t -> 'a Async.Deferred.t
OCaml

Innovation. Community. Security.