package ssl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ssl_error =
  1. | Error_none
  2. | Error_ssl
  3. | Error_want_read
  4. | Error_want_write
  5. | Error_want_x509_lookup
  6. | Error_syscall
  7. | Error_zero_return
  8. | Error_want_connect
  9. | Error_want_accept
exception Method_error
exception Context_error
exception Cipher_error
exception Diffie_hellman_error
exception Ec_curve_error
exception Certificate_error
exception Private_key_error
exception Unmatching_keys
exception Invalid_socket
exception Handler_error
exception Connection_error of ssl_error
exception Accept_error of ssl_error
exception Read_error of ssl_error
exception Write_error of ssl_error
type verify_error =
  1. | Error_v_unable_to_get_issuer_cert
  2. | Error_v_unable_to_get_ctl
  3. | Error_v_unable_to_decrypt_cert_signature
  4. | Error_v_unable_to_decrypt_CRL_signature
  5. | Error_v_unable_to_decode_issuer_public_key
  6. | Error_v_cert_signature_failure
  7. | Error_v_CRL_signature_failure
  8. | Error_v_cert_not_yet_valid
  9. | Error_v_cert_has_expired
  10. | Error_v_CRL_not_yet_valid
  11. | Error_v_CRL_has_expired
  12. | Error_v_error_in_cert_not_before_field
  13. | Error_v_error_in_cert_not_after_field
  14. | Error_v_error_in_CRL_last_update_field
  15. | Error_v_error_in_CRL_next_update_field
  16. | Error_v_out_of_mem
  17. | Error_v_depth_zero_self_signed_cert
  18. | Error_v_self_signed_cert_in_chain
  19. | Error_v_unable_to_get_issuer_cert_locally
  20. | Error_v_unable_to_verify_leaf_signature
  21. | Error_v_cert_chain_too_long
  22. | Error_v_cert_revoked
  23. | Error_v_invalid_CA
  24. | Error_v_path_length_exceeded
  25. | Error_v_invalid_purpose
  26. | Error_v_cert_untrusted
  27. | Error_v_cert_rejected
  28. | Error_v_subject_issuer_mismatch
  29. | Error_v_akid_skid_mismatch
  30. | Error_v_akid_issuer_serial_mismatch
  31. | Error_v_keyusage_no_certsign
  32. | Error_v_application_verification
exception Verify_error of verify_error
val init : ?thread_safe:bool -> unit -> unit
val get_error_string : unit -> string
type protocol =
  1. | SSLv23
  2. | SSLv3
  3. | TLSv1
  4. | TLSv1_1
  5. | TLSv1_2
type socket
val thread_safe : bool ref
type context
type context_type =
  1. | Client_context
  2. | Server_context
  3. | Both_context
val create_context : protocol -> context_type -> context
val use_certificate : context -> string -> string -> unit
val set_password_callback : context -> (bool -> string) -> unit
val set_client_CA_list_from_file : context -> string -> unit
type verify_mode =
  1. | Verify_peer
  2. | Verify_fail_if_no_peer_cert
  3. | Verify_client_once
type verify_callback
val client_verify_callback : verify_callback
val set_client_verify_callback_verbose : bool -> unit
val set_verify : context -> verify_mode list -> verify_callback option -> unit
val set_verify_depth : context -> int -> unit
type cipher
val disable_protocols : context -> protocol list -> unit
val set_cipher_list : context -> string -> unit
val honor_cipher_order : context -> unit
val init_dh_from_file : context -> string -> unit
val init_ec_from_named_curve : context -> string -> unit
val get_cipher : socket -> cipher
val get_cipher_description : cipher -> string
val get_cipher_name : cipher -> string
val get_cipher_version : cipher -> string
type certificate
val read_certificate : string -> certificate
val write_certificate : string -> certificate -> unit
val get_certificate : socket -> certificate
val get_issuer : certificate -> string
val get_subject : certificate -> string
val load_verify_locations : context -> string -> string -> unit
val get_verify_result : socket -> int
val embed_socket : Unix.file_descr -> context -> socket
val open_connection : protocol -> Unix.sockaddr -> socket
val open_connection_with_context : context -> Unix.sockaddr -> socket
val shutdown_connection : socket -> unit
val set_client_SNI_hostname : socket -> string -> unit
val connect : socket -> unit
val accept : socket -> unit
val flush : socket -> unit
val shutdown : socket -> unit
val verify : socket -> unit
val file_descr_of_socket : socket -> Unix.file_descr
val read : socket -> Bytes.t -> int -> int -> int
val read_into_bigarray : socket -> bigarray -> int -> int -> int
val read_into_bigarray_blocking : socket -> bigarray -> int -> int -> int
val write : socket -> Bytes.t -> int -> int -> int
val write_substring : socket -> string -> int -> int -> int
val write_bigarray : socket -> bigarray -> int -> int -> int
val write_bigarray_blocking : socket -> bigarray -> int -> int -> int
val input_string : socket -> string
val output_string : socket -> string -> unit
val input_char : socket -> char
val output_char : socket -> char -> unit
val input_int : socket -> int
val output_int : socket -> int -> unit
OCaml

Innovation. Community. Security.