Plasma GitLab Archive
Projects Blog Knowledge

sig
  type config
  type credentials
  type endpoint
  module Exc : Netsys_crypto_types.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:dh_params ->
    ?verify:(endpoint -> bool -> bool -> bool) ->
    peer_auth:[ `None | `Optional | `Required ] ->
    credentials:credentials -> unit -> 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:crt_list list ->
    ?revoke:crl_list list ->
    ?keys:(crt_list * private_key * string option) list ->
    unit -> credentials
  val create_endpoint :
    role:[ `Client | `Server ] ->
    recv:(Netsys_types.memory -> int) ->
    send:(Netsys_types.memory -> int -> int) ->
    peer_name:string option -> config -> endpoint
  val stash_endpoint : endpoint -> exn
  val restore_endpoint :
    recv:(Netsys_types.memory -> int) ->
    send:(Netsys_types.memory -> int -> int) -> exn -> endpoint
  val resume_client :
    recv:(Netsys_types.memory -> int) ->
    send:(Netsys_types.memory -> int -> int) ->
    peer_name:string option -> config -> string -> endpoint
  type state =
      [ `Accepting
      | `Data_r
      | `Data_rs
      | `Data_rw
      | `Data_w
      | `End
      | `Handshake
      | `Refusing
      | `Start
      | `Switching ]
  val get_state : endpoint -> state
  type raw_credentials = [ `Anonymous | `X509 of string ]
  val at_transport_eof : endpoint -> bool
  val hello : endpoint -> unit
  val bye : endpoint -> Unix.shutdown_command -> unit
  val verify : endpoint -> unit
  val get_config : endpoint -> config
  val get_endpoint_creds : endpoint -> raw_credentials
  val get_peer_creds : endpoint -> raw_credentials
  val get_peer_creds_list : endpoint -> raw_credentials list
  val switch : endpoint -> config -> unit
  val accept_switch : endpoint -> config -> unit
  val refuse_switch : endpoint -> unit
  val send : endpoint -> Netsys_types.memory -> int -> int
  val recv : endpoint -> Netsys_types.memory -> int
  val recv_will_not_block : endpoint -> bool
  val get_session_id : endpoint -> string
  val get_session_data : endpoint -> string
  val get_cipher_suite_type : endpoint -> string
  val get_cipher_algo : endpoint -> string
  val get_kx_algo : endpoint -> string
  val get_mac_algo : endpoint -> string
  val get_compression_algo : endpoint -> string
  val get_cert_type : endpoint -> string
  val get_protocol : endpoint -> string
  type server_name = [ `Domain of string ]
  val get_addressed_servers : endpoint -> server_name list
  val set_session_cache :
    store:(string -> string -> unit) ->
    remove:(string -> unit) ->
    retrieve:(string -> string) -> endpoint -> unit
  val implementation_name : string
  val implementation : unit -> exn
  val gnutls_session : endpoint -> Nettls_gnutls_bindings.gnutls_session_t
  val gnutls_credentials :
    credentials -> Nettls_gnutls_bindings.gnutls_credentials
end
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml