`sig
type config
type credentials
type endpoint
module Exc : TLS_EXCEPTIONS
val error_message : string -> string
type dh_params =
[ `Generate of int | `PKCS3_DER of string | `PKCS3_PEM_file of string ]
val create_config :
?algorithms:string ->
?dh_params:Netsys_crypto_types.TLS_PROVIDER.dh_params ->
?verify:(Netsys_crypto_types.TLS_PROVIDER.endpoint ->
bool -> bool -> bool) ->
peer_auth:[ `None | `Optional | `Required ] ->
credentials:Netsys_crypto_types.TLS_PROVIDER.credentials ->
unit -> Netsys_crypto_types.TLS_PROVIDER.config
type crt_list = [ `DER of string list | `PEM_file of string ]
type crl_list = [ `DER of string list | `PEM_file of string ]
type private_key =
[ `DSA of string
| `EC of string
| `PEM_file of string
| `PKCS8 of string
| `PKCS8_encrypted of string
| `RSA of string ]
val create_x509_credentials :
?system_trust:bool ->
?trust:Netsys_crypto_types.TLS_PROVIDER.crt_list list ->
?revoke:Netsys_crypto_types.TLS_PROVIDER.crl_list list ->
?keys:(Netsys_crypto_types.TLS_PROVIDER.crt_list *
Netsys_crypto_types.TLS_PROVIDER.private_key * string option)
list ->
unit -> Netsys_crypto_types.TLS_PROVIDER.credentials
val create_endpoint :
role:[ `Client | `Server ] ->
recv:(Netsys_types.memory -> int) ->
send:(Netsys_types.memory -> int -> int) ->
peer_name:string option ->
Netsys_crypto_types.TLS_PROVIDER.config ->
Netsys_crypto_types.TLS_PROVIDER.endpoint
val stash_endpoint : Netsys_crypto_types.TLS_PROVIDER.endpoint -> exn
val restore_endpoint :
recv:(Netsys_types.memory -> int) ->
send:(Netsys_types.memory -> int -> int) ->
exn -> Netsys_crypto_types.TLS_PROVIDER.endpoint
val resume_client :
recv:(Netsys_types.memory -> int) ->
send:(Netsys_types.memory -> int -> int) ->
peer_name:string option ->
Netsys_crypto_types.TLS_PROVIDER.config ->
string -> Netsys_crypto_types.TLS_PROVIDER.endpoint
type state =
[ `Accepting
| `Data_r
| `Data_rs
| `Data_rw
| `Data_w
| `End
| `Handshake
| `Refusing
| `Start
| `Switching ]
val get_state :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.state
type raw_credentials = [ `Anonymous | `X509 of string ]
val at_transport_eof : Netsys_crypto_types.TLS_PROVIDER.endpoint -> bool
val hello : Netsys_crypto_types.TLS_PROVIDER.endpoint -> unit
val bye :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Unix.shutdown_command -> unit
val verify : Netsys_crypto_types.TLS_PROVIDER.endpoint -> unit
val get_config :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.config
val get_endpoint_creds :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.raw_credentials
val get_peer_creds :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.raw_credentials
val get_peer_creds_list :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.raw_credentials list
val switch :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.config -> unit
val accept_switch :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.config -> unit
val refuse_switch : Netsys_crypto_types.TLS_PROVIDER.endpoint -> unit
val send :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_types.memory -> int -> int
val recv :
Netsys_crypto_types.TLS_PROVIDER.endpoint -> Netsys_types.memory -> int
val recv_will_not_block : Netsys_crypto_types.TLS_PROVIDER.endpoint -> bool
val get_session_id : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_session_data : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_cipher_suite_type :
Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_cipher_algo : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_kx_algo : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_mac_algo : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_compression_algo :
Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_cert_type : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
val get_protocol : Netsys_crypto_types.TLS_PROVIDER.endpoint -> string
type server_name = [ `Domain of string ]
val get_addressed_servers :
Netsys_crypto_types.TLS_PROVIDER.endpoint ->
Netsys_crypto_types.TLS_PROVIDER.server_name list
val set_session_cache :
store:(string -> string -> unit) ->
remove:(string -> unit) ->
retrieve:(string -> string) ->
Netsys_crypto_types.TLS_PROVIDER.endpoint -> unit
val implementation_name : string
val implementation : unit -> exn
end`