Module Async_ssl__Ffi__library_must_be_initialized.Ssl

type t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create_exn : Ssl_ctx.t -> t

Creates a new SSL connection, with a memory-backed BIO.

val set_method : t -> Async_ssl.Version.t -> unit

Sets a different crypto method for this particular ssl connection.

val set_initial_state : t -> [ `Connect | `Accept ] -> unit

Prepare the ssl connection for an initial handshake - either as a server (`Accept) or as a client (`Connect).

val connect : t -> (unit, Ssl_error.t) Core.Result.t
val accept : t -> (unit, Ssl_error.t) Core.Result.t
val set_bio : t -> input:Bio.t -> output:Bio.t -> unit

Set the binary IO buffers associated with an SSL connection.

val read : t -> buf:char Ctypes.ptr -> len:int -> (int, Ssl_error.t) Core.Result.t

Read from the SSL application side.

val write : t -> buf:string -> len:int -> (int, Ssl_error.t) Core.Result.t

Write to the SSL application side.

val check_private_key : t -> unit Core.Or_error.t
val set_verify : t -> Async_ssl.Verify_mode.t list -> unit
val get_peer_certificate : t -> X509.t option
val get_verify_result : t -> unit Core.Or_error.t
val get_version : t -> Async_ssl.Version.t
val session_reused : t -> bool
val set_session : t -> Ssl_session.t -> unit Core.Or_error.t
val get1_session : t -> Ssl_session.t option
val set_tlsext_host_name : t -> string -> unit Core.Or_error.t
val set_cipher_list_exn : t -> string list -> unit
module Tmp_dh_callback : Foreign.Funptr with type Tmp_dh_callback.fn = t -> bool -> int -> Dh.t
val set_tmp_dh_callback : t -> Tmp_dh_callback.t -> unit
val set_tmp_ecdh : t -> Ec_key.t -> unit
module Tmp_rsa_callback : Foreign.Funptr with type Tmp_rsa_callback.fn = t -> bool -> int -> Rsa.t
val set_tmp_rsa_callback : t -> Tmp_rsa_callback.t -> unit
val get_cipher_list : t -> string list
val get_peer_certificate_chain : t -> string option