Ssl

`sig
type ssl_error =
Error_none
| Error_ssl
| Error_want_read
| Error_want_write
| Error_want_x509_lookup
| Error_syscall
| Error_zero_return
| Error_want_connect
| Error_want_accept
exception Method_error
exception Context_error
exception Certificate_error
exception Private_key_error
exception Unmatching_keys
exception Invalid_socket
exception Handler_error
exception Connection_error of Ssl.ssl_error
exception Accept_error of Ssl.ssl_error
exception Read_error of Ssl.ssl_error
exception Write_error of Ssl.ssl_error
type verify_error =
Error_v_unable_to_get_issuer_cert
| Error_v_unable_to_get_ctl
| Error_v_unable_to_decrypt_cert_signature
| Error_v_unable_to_decrypt_CRL_signature
| Error_v_unable_to_decode_issuer_public_key
| Error_v_cert_signature_failure
| Error_v_CRL_signature_failure
| Error_v_cert_not_yet_valid
| Error_v_cert_has_expired
| Error_v_CRL_not_yet_valid
| Error_v_CRL_has_expired
| Error_v_error_in_cert_not_before_field
| Error_v_error_in_cert_not_after_field
| Error_v_error_in_CRL_last_update_field
| Error_v_error_in_CRL_next_update_field
| Error_v_out_of_mem
| Error_v_depth_zero_self_signed_cert
| Error_v_self_signed_cert_in_chain
| Error_v_unable_to_get_issuer_cert_locally
| Error_v_unable_to_verify_leaf_signature
| Error_v_cert_chain_too_long
| Error_v_cert_revoked
| Error_v_invalid_CA
| Error_v_path_length_exceeded
| Error_v_invalid_purpose
| Error_v_cert_untrusted
| Error_v_cert_rejected
| Error_v_subject_issuer_mismatch
| Error_v_akid_skid_mismatch
| Error_v_akid_issuer_serial_mismatch
| Error_v_keyusage_no_certsign
| Error_v_application_verification
exception Verify_error of Ssl.verify_error
val init : ?thread_safe:bool -> unit -> unit
val get_error_string : unit -> string
type protocol = SSLv23 | SSLv3 | TLSv1
type socket
val thread_safe : bool Pervasives.ref
type context
type context_type = Client_context | Server_context | Both_context
val create_context : Ssl.protocol -> Ssl.context_type -> Ssl.context
val use_certificate : Ssl.context -> string -> string -> unit
val set_password_callback : Ssl.context -> (bool -> string) -> unit
val set_client_CA_list_from_file : Ssl.context -> string -> unit
type verify_mode =
Verify_peer
| Verify_fail_if_no_peer_cert
| Verify_client_once
type verify_callback
val client_verify_callback : Ssl.verify_callback
val set_verify :
Ssl.context -> Ssl.verify_mode list -> Ssl.verify_callback option -> unit
val set_verify_depth : Ssl.context -> int -> unit
type cipher
val set_cipher_list : Ssl.context -> string -> unit
val get_cipher : Ssl.socket -> Ssl.cipher
val get_cipher_description : Ssl.cipher -> string
val get_cipher_name : Ssl.cipher -> string
val get_cipher_version : Ssl.cipher -> string
type certificate
val read_certificate : string -> Ssl.certificate
val write_certificate : string -> Ssl.certificate -> unit
val get_certificate : Ssl.socket -> Ssl.certificate
val get_issuer : Ssl.certificate -> string
val get_subject : Ssl.certificate -> string
val load_verify_locations : Ssl.context -> string -> string -> unit
val get_verify_result : Ssl.socket -> int
val embed_socket : Unix.file_descr -> Ssl.context -> Ssl.socket
val open_connection : Ssl.protocol -> Unix.sockaddr -> Ssl.socket
val open_connection_with_context :
Ssl.context -> Unix.sockaddr -> Ssl.socket
val shutdown_connection : Ssl.socket -> unit
val connect : Ssl.socket -> unit
val accept : Ssl.socket -> unit
val flush : Ssl.socket -> unit
val shutdown : Ssl.socket -> unit
val verify : Ssl.socket -> unit
val file_descr_of_socket : Ssl.socket -> Unix.file_descr
val read : Ssl.socket -> string -> int -> int -> int
val write : Ssl.socket -> string -> int -> int -> int
val input_string : Ssl.socket -> string
val output_string : Ssl.socket -> string -> unit
val input_char : Ssl.socket -> char
val output_char : Ssl.socket -> char -> unit
val input_int : Ssl.socket -> int
val output_int : Ssl.socket -> int -> unit
end`