include sig ... end
val sexp_of_t : t ‑> Sexplib.Sexp.t
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 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 use_certificate_file : t ‑> crt:string ‑> file_type:[ `PEM | `ASN1 ] ‑> (unit, string list) Core.Result.t Async.Deferred.t
Use a certificate file, signed by a CA (or self-signed if you prefer) to validate
you are who you say you are. The file will generally end in .crt
.
The 'type' is the encoding of your certificate file. You should know this!
val use_private_key_file : t ‑> key:string ‑> file_type:[ `PEM | `ASN1 ] ‑> (unit, string list) Core.Result.t Async.Deferred.t
For servers, use a private key key
for securing communications.
> openssl genrsa -out server.key 4096 # generates a key called server.key
The file will generally end in .key
.
The 'type' is the encoding of your certificate file. You should know this!
val check_private_key : t ‑> unit Core.Or_error.t
val set_verify : t ‑> Verify_mode.t list ‑> unit
val get_verify_result : t ‑> unit Core.Or_error.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
Set the list of available ciphers for client or server connections.
This is really SSL_set_cipher_list t (String.concat ~sep:":" ("-ALL" :: ciphers))
.
val set_cipher_list_exn : t ‑> string list ‑> unit
val get_cipher_list : t ‑> string list