Ocamlnet 4 Reference Manual : Nettls_gnutls_bindings

`sig
type gnutls_cipher_algorithm_t
type gnutls_kx_algorithm_t
type gnutls_mac_algorithm_t
type gnutls_compression_method_t
type gnutls_pk_algorithm_t
type gnutls_sign_algorithm_t
type gnutls_certificate_type_t
type gnutls_digest_algorithm_t =
Nettls_gnutls_bindings.gnutls_mac_algorithm_t
type gnutls_session_t
type gnutls_dh_params_t
type gnutls_priority_t
type gnutls_cipher_hd_t
type gnutls_x509_privkey_t
type gnutls_x509_crl_t
type gnutls_x509_crt_t
type gnutls_certificate_credentials_t
type gnutls_anon_server_credentials_t
type gnutls_anon_client_credentials_t
type gnutls_srp_server_credentials_t
type gnutls_srp_client_credentials_t
type gnutls_psk_server_credentials_t
type gnutls_psk_client_credentials_t
type gnutls_pubkey_t
type gnutls_privkey_t
type gnutls_params_type_t = [ `Dh | `Ecdh | `Rsa_export ]
type gnutls_credentials_type_t =
[ `Anon | `Certificate | `Ia | `Psk | `Srp ]
type gnutls_alert_level_t = [ `Fatal | `Warning ]
type gnutls_alert_description_t =
[ `Access_denied
| `Bad_certificate
| `Bad_record_mac
| `Certificate_expired
| `Certificate_revoked
| `Certificate_unknown
| `Certificate_unobtainable
| `Close_notify
| `Decode_error
| `Decompression_failure
| `Decrypt_error
| `Decryption_failed
| `Export_restriction
| `Handshake_failure
| `Illegal_parameter
| `Inner_application_failure
| `Inner_application_verification
| `Insufficient_security
| `Internal_error
| `No_application_protocol
| `No_renegotiation
| `Protocol_version
| `Record_overflow
| `Ssl3_no_certificate
| `Unexpected_message
| `Unknown_ca
| `Unknown_psk_identity
| `Unrecognized_name
| `Unsupported_certificate
| `Unsupported_extension
| `User_canceled ]
type gnutls_handshake_description_t =
[ `Certificate_pkt
| `Certificate_request
| `Certificate_verify
| `Change_cipher_spec
| `Client_hello
| `Client_hello_v2
| `Client_key_exchange
| `Finished
| `Hello_request
| `Hello_verify_request
| `New_session_ticket
| `Server_hello
| `Server_hello_done
| `Server_key_exchange
| `Supplemental ]
type gnutls_certificate_status_t_flag =
[ `Expired
| `Insecure_algorithm
| `Invalid
| `Mismatch
| `Not_activated
| `Purpose_mismatch
| `Revocation_data_issued_in_future
| `Revocation_data_superseded
| `Revoked
| `Signature_failure
| `Signer_constraints_failure
| `Signer_not_ca
| `Signer_not_found
| `Unexpected_owner ]
type gnutls_certificate_status_t =
Nettls_gnutls_bindings.gnutls_certificate_status_t_flag list
type gnutls_certificate_request_t = [ `Ignore | `Request | `Require ]
type gnutls_certificate_verify_flags_flag =
[ `Allow_any_x509_v1_ca_crt
| `Allow_sign_rsa_md2
| `Allow_sign_rsa_md5
| `Allow_x509_v1_ca_crt
| `Disable_ca_sign
| `Disable_crl_checks
| `Disable_time_checks
| `Disable_trusted_time_checks
| `Do_not_allow_same
| `Do_not_allow_x509_v1_ca_crt ]
type gnutls_certificate_verify_flags =
Nettls_gnutls_bindings.gnutls_certificate_verify_flags_flag list
type gnutls_close_request_t = [ `Rdwr | `Wr ]
type gnutls_protocol_t =
[ `Dtls0_9
| `Dtls1_0
| `Dtls1_2
| `Ssl3
| `Tls1_0
| `Tls1_1
| `Tls1_2
| `Version_unknown ]
type gnutls_x509_crt_fmt_t = [ `Der | `Pem ]
type gnutls_certificate_print_formats_t =
[ `Compact | `Full | `Full_numbers | `Oneline | `Unsigned_full ]
type gnutls_ecc_curve_t =
[ `Invalid
| `Secp192r1
| `Secp224r1
| `Secp256r1
| `Secp384r1
| `Secp521r1 ]
type gnutls_sec_param_t =
[ `Export
| `High
| `Insecure
| `Legacy
| `Low
| `Normal
| `Ultra
| `Unknown
| `Very_weak
| `Weak ]
type gnutls_init_flags_flag =
[ `Client
| `Datagram
| `No_extensions
| `No_replay_protection
| `Nonblock
| `Server ]
type gnutls_init_flags = Nettls_gnutls_bindings.gnutls_init_flags_flag list
type gnutls_server_name_type_t = [ `Dns ]
type gnutls_supplemental_data_format_type_t = [ `Unknown ]
type gnutls_psk_key_flags = [ `Hex | `Raw ]
type gnutls_x509_subject_alt_name_t =
[ `Dn
| `Dnsname
| `Ipaddress
| `Othername
| `Othername_xmpp
| `Rfc822name
| `Uri ]
type gnutls_privkey_type_t = [ `Ext | `Openpgp | `Pkcs11 | `X509 ]
type key_usage_flag =
[ `Crl_sign
| `Data_encipherment
| `Decipher_only
| `Digital_signature
| `Encipher_only
| `Key_agreement
| `Key_cert_sign
| `Key_encipherment
| `Non_repudiation ]
type key_usage = Nettls_gnutls_bindings.key_usage_flag list
type gnutls_channel_binding_t = [ `Tls_unique ]
type gnutls_info_access_what_t =
[ `Accesslocation_generalname_type
| `Accessmethod_oid
| `Caissuers_uri
| `Ocsp_uri
| `Unknown
| `Uri ]
type gnutls_certificate_import_flags_flag =
[ `Fail_if_unsorted | `Import_fail_if_exceed | `Sort ]
type gnutls_certificate_import_flags =
Nettls_gnutls_bindings.gnutls_certificate_import_flags_flag list
type error_code =
[ `Again
| `Asn1_der_error
| `Asn1_der_overflow
| `Asn1_element_not_found
| `Asn1_generic_error
| `Asn1_identifier_not_found
| `Asn1_syntax_error
| `Asn1_tag_error
| `Asn1_tag_implicit
| `Asn1_type_any_error
| `Asn1_value_not_found
| `Asn1_value_not_valid
| `Auth_error
| `Bad_cookie
| `Base64_decoding_error
| `Base64_encoding_error
| `Base64_unexpected_header_error
| `Certificate_error
| `Certificate_key_mismatch
| `Certificate_list_unsorted
| `Channel_binding_not_available
| `Compression_failed
| `Constraint_error
| `Crypto_already_registered
| `Crypto_init_failed
| `Cryptodev_device_error
| `Cryptodev_ioctl_error
| `Db_error
| `Decompression_failed
| `Decryption_failed
| `Dh_prime_unacceptable
| `Ecc_no_supported_curves
| `Ecc_unsupported_curve
| `Encryption_failed
| `Error_in_finished_packet
| `Expired
| `Fatal_alert_received
| `File_error
| `Got_application_data
| `Handshake_too_large
| `Hash_failed
| `Heartbeat_ping_received
| `Heartbeat_pong_received
| `Ia_verify_failed
| `Idna_error
| `Illegal_parameter
| `Illegal_srp_username
| `Incompat_dsa_key_with_tls_protocol
| `Incompatible_crypto_library
| `Incompatible_libtasn1_library
| `Insufficient_credentials
| `Internal_error
| `Interrupted
| `Invalid_password
| `Invalid_request
| `Invalid_session
| `Key_import_failed
| `Key_usage_violation
| `Large_packet
| `Lib_in_error_state
| `Locking_error
| `Mac_verify_failed
| `Memory_error
| `Mpi_print_failed
| `Mpi_scan_failed
| `Need_fallback
| `No_application_protocol
| `No_certificate_found
| `No_certificate_status
| `No_cipher_suites
| `No_compression_algorithms
| `No_priorities_were_set
| `No_self_test
| `No_temporary_dh_params
| `No_temporary_rsa_params
| `Ocsp_response_error
| `Openpgp_fingerprint_unsupported
| `Openpgp_getkey_failed
| `Openpgp_keyring_error
| `Openpgp_preferred_key_error
| `Openpgp_subkey_error
| `Openpgp_uid_revoked
| `Parsing_error
| `Pk_decryption_failed
| `Pk_encryption_failed
| `Pk_generation_error
| `Pk_sig_verify_failed
| `Pk_sign_failed
| `Pkcs11_attribute_error
| `Pkcs11_data_error
| `Pkcs11_device_error
| `Pkcs11_error
| `Pkcs11_key_error
| `Pkcs11_load_error
| `Pkcs11_pin_error
| `Pkcs11_pin_expired
| `Pkcs11_pin_locked
| `Pkcs11_requested_object_not_availble
| `Pkcs11_session_error
| `Pkcs11_signature_error
| `Pkcs11_slot_error
| `Pkcs11_token_error
| `Pkcs11_unsupported_feature_error
| `Pkcs11_user_error
| `Pkcs1_wrong_pad
| `Premature_termination
| `Pull_error
| `Push_error
| `Random_device_error
| `Random_failed
| `Received_illegal_extension
| `Received_illegal_parameter
| `Record_limit_reached
| `Rehandshake
| `Requested_data_not_available
| `Safe_renegotiation_failed
| `Self_test_error
| `Session_eof
| `Short_memory_buffer
| `Sockets_init_error
| `Srp_pwd_error
| `Srp_pwd_parsing_error
| `Success
| `Timedout
| `Too_many_empty_packets
| `Too_many_handshake_packets
| `Tpm_error
| `Tpm_key_not_found
| `Tpm_key_password_error
| `Tpm_session_error
| `Tpm_srk_password_error
| `Tpm_uninitialized
| `Unexpected_handshake_packet
| `Unexpected_packet
| `Unexpected_packet_length
| `Unimplemented_feature
| `Unknown_algorithm
| `Unknown_cipher_suite
| `Unknown_cipher_type
| `Unknown_compression_algorithm
| `Unknown_hash_algorithm
| `Unknown_pk_algorithm
| `Unknown_pkcs_bag_type
| `Unknown_pkcs_content_type
| `Unknown_srp_username
| `Unsafe_renegotiation_denied
| `Unsupported_certificate_type
| `Unsupported_signature_algorithm
| `Unsupported_version_packet
| `Unwanted_algorithm
| `User_error
| `Warning_alert_received
| `Warning_ia_fphf_received
| `Warning_ia_iphf_received
| `X509_unknown_san
| `X509_unsupported_attribute
| `X509_unsupported_critical_extension
| `X509_unsupported_extension
| `X509_unsupported_oid ]
type gnutls_pkcs_encrypt_flags_t_flag =
[ `Null_password
| `Plain
| `Use_pbes2_3des
| `Use_pbes2_aes_128
| `Use_pbes2_aes_192
| `Use_pbes2_aes_256
| `Use_pbes2_des
| `Use_pkcs12_3des
| `Use_pkcs12_arcfour
| `Use_pkcs12_rc2_40 ]
type gnutls_pkcs_encrypt_flags_t =
Nettls_gnutls_bindings.gnutls_pkcs_encrypt_flags_t_flag list
type empty_flags_flag = [ `Dummy ]
type empty_flags = Nettls_gnutls_bindings.empty_flags_flag list
type str_datum = string
type str_datum_p = string
type const_str_datum_p = string
val nettls_init : unit -> unit
val nettls_deinit : unit -> unit
val gnutls_error_is_fatal : Nettls_gnutls_bindings.error_code -> bool
val gnutls_strerror : Nettls_gnutls_bindings.error_code -> string
val gnutls_strerror_name : Nettls_gnutls_bindings.error_code -> string
val gnutls_check_version : unit -> string
val gnutls_global_set_log_level : int -> unit
val gnutls_init :
Nettls_gnutls_bindings.gnutls_init_flags ->
Nettls_gnutls_bindings.gnutls_session_t
val gnutls_certificate_server_set_request :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_certificate_request_t -> unit
val gnutls_certificate_send_x509_rdn_sequence :
Nettls_gnutls_bindings.gnutls_session_t -> bool -> unit
val gnutls_certificate_verify_peers2 :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_certificate_status_t
val gnutls_certificate_get_peers :
Nettls_gnutls_bindings.gnutls_session_t -> string array
val gnutls_record_get_direction :
Nettls_gnutls_bindings.gnutls_session_t -> bool
val gnutls_handshake : Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_rehandshake : Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_record_send :
Nettls_gnutls_bindings.gnutls_session_t ->
Netsys_mem.memory -> int -> int
val gnutls_record_recv :
Nettls_gnutls_bindings.gnutls_session_t -> Netsys_mem.memory -> int
val gnutls_record_check_pending :
Nettls_gnutls_bindings.gnutls_session_t -> int
val gnutls_bye :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_close_request_t -> unit
val gnutls_alert_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_alert_description_t
val gnutls_alert_get_name :
Nettls_gnutls_bindings.gnutls_alert_description_t -> string
val gnutls_alert_get_strname :
Nettls_gnutls_bindings.gnutls_alert_description_t -> string
val gnutls_alert_send :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_alert_level_t ->
Nettls_gnutls_bindings.gnutls_alert_description_t -> unit
val gnutls_alert_send_appropriate :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_error_to_alert :
Nettls_gnutls_bindings.error_code ->
Nettls_gnutls_bindings.gnutls_alert_description_t *
Nettls_gnutls_bindings.gnutls_alert_level_t
val gnutls_priority_init :
string -> Nettls_gnutls_bindings.gnutls_priority_t
val gnutls_priority_get_cipher_suite_index :
Nettls_gnutls_bindings.gnutls_priority_t -> int -> int
val gnutls_priority_set :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_priority_t -> unit
val gnutls_set_default_priority :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_sec_param_to_pk_bits :
Nettls_gnutls_bindings.gnutls_pk_algorithm_t ->
Nettls_gnutls_bindings.gnutls_sec_param_t -> int
val gnutls_pk_bits_to_sec_param :
Nettls_gnutls_bindings.gnutls_pk_algorithm_t ->
int -> Nettls_gnutls_bindings.gnutls_sec_param_t
val gnutls_sec_param_get_name :
Nettls_gnutls_bindings.gnutls_sec_param_t -> string
val gnutls_session_set_data :
Nettls_gnutls_bindings.gnutls_session_t -> Bytes.t -> unit
val gnutls_session_get_data :
Nettls_gnutls_bindings.gnutls_session_t -> Bytes.t
val gnutls_session_get_id :
Nettls_gnutls_bindings.gnutls_session_t -> Bytes.t
val gnutls_session_is_resumed :
Nettls_gnutls_bindings.gnutls_session_t -> bool
val gnutls_db_set_cache_expiration :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_db_remove_session :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_db_check_entry :
Nettls_gnutls_bindings.gnutls_session_t -> string -> int
val gnutls_session_ticket_key_generate : unit -> string
val gnutls_session_ticket_enable_client :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_session_ticket_enable_server :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.str_datum_p -> unit
val gnutls_prf :
Nettls_gnutls_bindings.gnutls_session_t ->
Netsys_mem.memory ->
bool -> Netsys_mem.memory -> Netsys_mem.memory -> unit
val gnutls_prf_raw :
Nettls_gnutls_bindings.gnutls_session_t ->
Netsys_mem.memory -> Netsys_mem.memory -> Netsys_mem.memory -> unit
val gnutls_session_channel_binding :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_channel_binding_t -> string
val gnutls_ecc_curve_get_name :
Nettls_gnutls_bindings.gnutls_ecc_curve_t -> string
val gnutls_ecc_curve_get_size :
Nettls_gnutls_bindings.gnutls_ecc_curve_t -> int
val gnutls_ecc_curve_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_ecc_curve_t
val gnutls_cipher_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_cipher_algorithm_t
val gnutls_kx_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_kx_algorithm_t
val gnutls_mac_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_mac_algorithm_t
val gnutls_compression_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_compression_method_t
val gnutls_certificate_type_get :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_certificate_type_t
val gnutls_cipher_get_key_size :
Nettls_gnutls_bindings.gnutls_cipher_algorithm_t -> int
val gnutls_mac_get_key_size :
Nettls_gnutls_bindings.gnutls_mac_algorithm_t -> int
val gnutls_cipher_get_name :
Nettls_gnutls_bindings.gnutls_cipher_algorithm_t -> string
val gnutls_mac_get_name :
Nettls_gnutls_bindings.gnutls_mac_algorithm_t -> string
val gnutls_compression_get_name :
Nettls_gnutls_bindings.gnutls_compression_method_t -> string
val gnutls_kx_get_name :
Nettls_gnutls_bindings.gnutls_kx_algorithm_t -> string
val gnutls_certificate_type_get_name :
Nettls_gnutls_bindings.gnutls_certificate_type_t -> string
val gnutls_pk_get_name :
Nettls_gnutls_bindings.gnutls_pk_algorithm_t -> string
val gnutls_sign_get_name :
Nettls_gnutls_bindings.gnutls_sign_algorithm_t -> string
val gnutls_mac_get_id :
string -> Nettls_gnutls_bindings.gnutls_mac_algorithm_t
val gnutls_compression_get_id :
string -> Nettls_gnutls_bindings.gnutls_compression_method_t
val gnutls_cipher_get_id :
string -> Nettls_gnutls_bindings.gnutls_cipher_algorithm_t
val gnutls_kx_get_id :
string -> Nettls_gnutls_bindings.gnutls_kx_algorithm_t
val gnutls_protocol_get_id :
string -> Nettls_gnutls_bindings.gnutls_protocol_t
val gnutls_certificate_type_get_id :
string -> Nettls_gnutls_bindings.gnutls_certificate_type_t
val gnutls_pk_get_id :
string -> Nettls_gnutls_bindings.gnutls_pk_algorithm_t
val gnutls_sign_get_id :
string -> Nettls_gnutls_bindings.gnutls_sign_algorithm_t
val gnutls_cipher_list :
unit -> Nettls_gnutls_bindings.gnutls_cipher_algorithm_t list
val gnutls_mac_list :
unit -> Nettls_gnutls_bindings.gnutls_mac_algorithm_t list
val gnutls_compression_list :
unit -> Nettls_gnutls_bindings.gnutls_compression_method_t list
val gnutls_protocol_list :
unit -> Nettls_gnutls_bindings.gnutls_protocol_t list
val gnutls_certificate_type_list :
unit -> Nettls_gnutls_bindings.gnutls_certificate_type_t list
val gnutls_kx_list :
unit -> Nettls_gnutls_bindings.gnutls_kx_algorithm_t list
val gnutls_pk_list :
unit -> Nettls_gnutls_bindings.gnutls_pk_algorithm_t list
val gnutls_sign_list :
unit -> Nettls_gnutls_bindings.gnutls_sign_algorithm_t list
val gnutls_protocol_get_version :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_protocol_t
val gnutls_protocol_get_name :
Nettls_gnutls_bindings.gnutls_protocol_t -> string
val gnutls_cipher_suite_get_name :
Nettls_gnutls_bindings.gnutls_kx_algorithm_t ->
Nettls_gnutls_bindings.gnutls_cipher_algorithm_t ->
Nettls_gnutls_bindings.gnutls_mac_algorithm_t -> string
val net_have_crypto : unit -> bool
val gnutls_cipher_init :
Nettls_gnutls_bindings.gnutls_cipher_algorithm_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_cipher_hd_t
val gnutls_cipher_encrypt2 :
Nettls_gnutls_bindings.gnutls_cipher_hd_t ->
Netsys_mem.memory -> Netsys_mem.memory -> unit
val gnutls_cipher_decrypt2 :
Nettls_gnutls_bindings.gnutls_cipher_hd_t ->
Netsys_mem.memory -> Netsys_mem.memory -> unit
val gnutls_cipher_add_auth :
Nettls_gnutls_bindings.gnutls_cipher_hd_t -> Bytes.t -> unit
val gnutls_cipher_tag :
Nettls_gnutls_bindings.gnutls_cipher_hd_t -> Bytes.t -> unit
val gnutls_handshake_set_private_extensions :
Nettls_gnutls_bindings.gnutls_session_t -> bool -> unit
val gnutls_handshake_get_last_out :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_handshake_description_t
val gnutls_handshake_get_last_in :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_handshake_description_t
val gnutls_handshake_set_max_packet_length :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_sign_algorithm_get_requested :
Nettls_gnutls_bindings.gnutls_session_t ->
int -> Nettls_gnutls_bindings.gnutls_sign_algorithm_t
val gnutls_session_enable_compatibility_mode :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_record_disable_padding :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_record_get_max_size :
Nettls_gnutls_bindings.gnutls_session_t -> int
val gnutls_record_set_max_size :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_server_name_set :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_server_name_type_t -> Bytes.t -> unit
val gnutls_server_name_get :
Nettls_gnutls_bindings.gnutls_session_t ->
int -> Bytes.t * Nettls_gnutls_bindings.gnutls_server_name_type_t
val gnutls_safe_renegotiation_status :
Nettls_gnutls_bindings.gnutls_session_t -> bool
val gnutls_supplemental_get_name :
Nettls_gnutls_bindings.gnutls_supplemental_data_format_type_t -> string
val gnutls_credentials_clear :
Nettls_gnutls_bindings.gnutls_session_t -> unit
val gnutls_key_generate : int -> string
val gnutls_fingerprint :
Nettls_gnutls_bindings.gnutls_digest_algorithm_t ->
Nettls_gnutls_bindings.str_datum_p -> Bytes.t
val gnutls_certificate_allocate_credentials :
unit -> Nettls_gnutls_bindings.gnutls_certificate_credentials_t
val gnutls_certificate_set_x509_system_trust :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t -> unit
val gnutls_certificate_set_x509_trust_file :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
string -> Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_trust_mem :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_crl_file :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
string -> Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_crl_mem :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_key_file :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
string -> string -> Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_key_mem :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_certificate_set_x509_simple_pkcs12_file :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
string -> Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> string -> unit
val gnutls_certificate_set_x509_simple_pkcs12_mem :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> string -> unit
val gnutls_certificate_set_x509_key :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array ->
Nettls_gnutls_bindings.gnutls_x509_privkey_t -> unit
val gnutls_certificate_set_x509_trust :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array -> int
val gnutls_certificate_set_x509_crl :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_x509_crl_t array -> int
val gnutls_anon_allocate_server_credentials :
unit -> Nettls_gnutls_bindings.gnutls_anon_server_credentials_t
val gnutls_anon_allocate_client_credentials :
unit -> Nettls_gnutls_bindings.gnutls_anon_client_credentials_t
val gnutls_dh_params_init :
unit -> Nettls_gnutls_bindings.gnutls_dh_params_t
val gnutls_dh_params_import_raw :
Nettls_gnutls_bindings.gnutls_dh_params_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.str_datum_p -> unit
val gnutls_dh_params_import_pkcs3 :
Nettls_gnutls_bindings.gnutls_dh_params_t ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_dh_params_generate2 :
Nettls_gnutls_bindings.gnutls_dh_params_t -> int -> unit
val gnutls_dh_params_cpy :
Nettls_gnutls_bindings.gnutls_dh_params_t ->
Nettls_gnutls_bindings.gnutls_dh_params_t -> unit
val gnutls_certificate_set_dh_params :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_dh_params_t -> unit
val gnutls_anon_set_server_dh_params :
Nettls_gnutls_bindings.gnutls_anon_server_credentials_t ->
Nettls_gnutls_bindings.gnutls_dh_params_t -> unit
val gnutls_psk_set_server_dh_params :
Nettls_gnutls_bindings.gnutls_psk_server_credentials_t ->
Nettls_gnutls_bindings.gnutls_dh_params_t -> unit
val gnutls_dh_set_prime_bits :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_dh_get_secret_bits :
Nettls_gnutls_bindings.gnutls_session_t -> int
val gnutls_dh_get_peers_public_bits :
Nettls_gnutls_bindings.gnutls_session_t -> int
val gnutls_dh_get_prime_bits :
Nettls_gnutls_bindings.gnutls_session_t -> int
val gnutls_dh_get_group :
Nettls_gnutls_bindings.gnutls_session_t -> string * string
val gnutls_dh_get_pubkey :
Nettls_gnutls_bindings.gnutls_session_t -> string
val gnutls_auth_get_type :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_credentials_type_t
val gnutls_auth_server_get_type :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_credentials_type_t
val gnutls_auth_client_get_type :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_credentials_type_t
val gnutls_certificate_get_ours :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.const_str_datum_p
val gnutls_certificate_activation_time_peers :
Nettls_gnutls_bindings.gnutls_session_t -> float
val gnutls_certificate_expiration_time_peers :
Nettls_gnutls_bindings.gnutls_session_t -> float
val gnutls_certificate_client_get_request_status :
Nettls_gnutls_bindings.gnutls_session_t -> bool
val gnutls_certificate_get_issuer :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.empty_flags ->
Nettls_gnutls_bindings.gnutls_x509_crt_t
val gnutls_certificate_set_verify_flags :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
Nettls_gnutls_bindings.gnutls_certificate_verify_flags -> unit
val gnutls_certificate_set_verify_limits :
Nettls_gnutls_bindings.gnutls_certificate_credentials_t ->
int -> int -> unit
val gnutls_srp_allocate_client_credentials :
unit -> Nettls_gnutls_bindings.gnutls_srp_client_credentials_t
val gnutls_srp_set_client_credentials :
Nettls_gnutls_bindings.gnutls_srp_client_credentials_t ->
string -> string -> unit
val gnutls_srp_allocate_server_credentials :
unit -> Nettls_gnutls_bindings.gnutls_srp_server_credentials_t
val gnutls_srp_set_server_credentials_file :
Nettls_gnutls_bindings.gnutls_srp_server_credentials_t ->
string -> string -> unit
val gnutls_srp_server_get_username :
Nettls_gnutls_bindings.gnutls_session_t -> string
val gnutls_srp_set_prime_bits :
Nettls_gnutls_bindings.gnutls_session_t -> int -> unit
val gnutls_srp_verifier :
string ->
string ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.str_datum_p -> string
val gnutls_psk_allocate_client_credentials :
unit -> Nettls_gnutls_bindings.gnutls_psk_client_credentials_t
val gnutls_psk_set_client_credentials :
Nettls_gnutls_bindings.gnutls_psk_client_credentials_t ->
string ->
Nettls_gnutls_bindings.str_datum_p ->
Nettls_gnutls_bindings.gnutls_psk_key_flags -> unit
val gnutls_psk_allocate_server_credentials :
unit -> Nettls_gnutls_bindings.gnutls_psk_server_credentials_t
val gnutls_psk_set_server_credentials_file :
Nettls_gnutls_bindings.gnutls_psk_server_credentials_t -> string -> unit
val gnutls_psk_set_server_credentials_hint :
Nettls_gnutls_bindings.gnutls_psk_server_credentials_t -> string -> unit
val gnutls_psk_server_get_username :
Nettls_gnutls_bindings.gnutls_session_t -> string
val gnutls_psk_client_get_hint :
Nettls_gnutls_bindings.gnutls_session_t -> string
val gnutls_x509_crt_init : unit -> Nettls_gnutls_bindings.gnutls_x509_crt_t
val gnutls_x509_crt_import :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_x509_crt_export :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> Bytes.t
val gnutls_x509_crt_get_issuer_dn :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_issuer_dn_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t
val gnutls_x509_crt_get_dn :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_dn_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t
val gnutls_x509_crt_check_hostname :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> string -> bool
val gnutls_x509_crt_get_signature_algorithm :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_sign_algorithm_t
val gnutls_x509_crt_get_signature :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_version :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int
val gnutls_x509_crt_get_key_id :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.empty_flags -> Bytes.t
val gnutls_x509_crt_get_authority_key_id :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t * bool
val gnutls_x509_crt_get_subject_key_id :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t * bool
val gnutls_x509_crt_get_subject_unique_id :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_issuer_unique_id :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_authority_info_access :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
int -> Nettls_gnutls_bindings.gnutls_info_access_what_t -> string * bool
val gnutls_x509_crt_get_activation_time :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> float
val gnutls_x509_crt_get_expiration_time :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> float
val gnutls_x509_crt_get_serial :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> Bytes.t
val gnutls_x509_crt_get_pk_algorithm :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_pk_algorithm_t * int
val gnutls_x509_crt_get_pk_rsa_raw :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> string * string
val gnutls_x509_crt_get_pk_dsa_raw :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
string * string * string * string
val gnutls_x509_crt_get_subject_alt_name :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
int ->
Nettls_gnutls_bindings.gnutls_x509_subject_alt_name_t * Bytes.t * bool
val gnutls_x509_crt_get_subject_alt_othername_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
int -> Nettls_gnutls_bindings.gnutls_x509_subject_alt_name_t * Bytes.t
val gnutls_x509_crt_get_issuer_alt_name :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
int ->
Nettls_gnutls_bindings.gnutls_x509_subject_alt_name_t * Bytes.t * bool
val gnutls_x509_crt_get_issuer_alt_othername_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
int -> Nettls_gnutls_bindings.gnutls_x509_subject_alt_name_t * Bytes.t
val gnutls_x509_crt_get_ca_status :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> bool
val gnutls_x509_crt_get_basic_constraints :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> bool * bool * int
val gnutls_x509_crt_get_key_usage :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.key_usage * bool
val gnutls_x509_crt_get_extension_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t
val gnutls_x509_crt_get_extension_info :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t * bool
val gnutls_x509_crt_get_extension_data :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t
val gnutls_x509_crt_check_issuer :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t -> bool
val gnutls_x509_crt_list_verify :
Nettls_gnutls_bindings.gnutls_x509_crt_t array ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array ->
Nettls_gnutls_bindings.gnutls_x509_crl_t array ->
Nettls_gnutls_bindings.gnutls_certificate_verify_flags ->
Nettls_gnutls_bindings.gnutls_certificate_status_t
val gnutls_x509_crt_verify :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array ->
Nettls_gnutls_bindings.gnutls_certificate_verify_flags ->
Nettls_gnutls_bindings.gnutls_certificate_status_t
val gnutls_x509_crl_verify :
Nettls_gnutls_bindings.gnutls_x509_crl_t ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array ->
Nettls_gnutls_bindings.gnutls_certificate_verify_flags ->
Nettls_gnutls_bindings.gnutls_certificate_status_t
val gnutls_x509_crt_check_revocation :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_x509_crl_t array -> bool
val gnutls_x509_crt_get_fingerprint :
Nettls_gnutls_bindings.gnutls_x509_crt_t ->
Nettls_gnutls_bindings.gnutls_digest_algorithm_t -> Bytes.t
val gnutls_x509_crt_get_key_purpose_oid :
Nettls_gnutls_bindings.gnutls_x509_crt_t -> int -> Bytes.t * bool
val gnutls_x509_privkey_init :
unit -> Nettls_gnutls_bindings.gnutls_x509_privkey_t
val gnutls_x509_privkey_import :
Nettls_gnutls_bindings.gnutls_x509_privkey_t ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_x509_privkey_import_pkcs8 :
Nettls_gnutls_bindings.gnutls_x509_privkey_t ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t ->
string -> Nettls_gnutls_bindings.gnutls_pkcs_encrypt_flags_t -> unit
val gnutls_x509_crl_init : unit -> Nettls_gnutls_bindings.gnutls_x509_crl_t
val gnutls_x509_crl_import :
Nettls_gnutls_bindings.gnutls_x509_crl_t ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val net_have_pubkey : unit -> bool
val gnutls_pubkey_init : unit -> Nettls_gnutls_bindings.gnutls_pubkey_t
val gnutls_privkey_init : unit -> Nettls_gnutls_bindings.gnutls_privkey_t
val gnutls_pubkey_import :
Nettls_gnutls_bindings.gnutls_pubkey_t ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t -> unit
val gnutls_pubkey_import_url :
Nettls_gnutls_bindings.gnutls_pubkey_t -> string -> int -> unit
val gnutls_pubkey_import_privkey :
Nettls_gnutls_bindings.gnutls_pubkey_t ->
Nettls_gnutls_bindings.gnutls_privkey_t -> int -> int -> unit
val gnutls_privkey_import_x509 :
Nettls_gnutls_bindings.gnutls_privkey_t ->
Nettls_gnutls_bindings.gnutls_x509_privkey_t -> int -> unit
val gnutls_pubkey_encrypt_data :
Nettls_gnutls_bindings.gnutls_pubkey_t ->
int -> Nettls_gnutls_bindings.const_str_datum_p -> string
val gnutls_privkey_decrypt_data :
Nettls_gnutls_bindings.gnutls_privkey_t ->
int -> Nettls_gnutls_bindings.const_str_datum_p -> string
val gnutls_privkey_sign_data :
Nettls_gnutls_bindings.gnutls_privkey_t ->
Nettls_gnutls_bindings.gnutls_digest_algorithm_t ->
int -> Nettls_gnutls_bindings.const_str_datum_p -> string
val gnutls_pubkey_verify_data2 :
Nettls_gnutls_bindings.gnutls_pubkey_t ->
Nettls_gnutls_bindings.gnutls_sign_algorithm_t ->
int ->
Nettls_gnutls_bindings.const_str_datum_p ->
Nettls_gnutls_bindings.const_str_datum_p -> unit
val b_error_of_name : string -> Nettls_gnutls_bindings.error_code
exception Null_pointer
exception Error of Nettls_gnutls_bindings.error_code
exception Short_memory_buffer of int
type memory =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
type gnutls_credentials =
[ `Anon_client of
Nettls_gnutls_bindings.gnutls_anon_client_credentials_t
| `Anon_server of
Nettls_gnutls_bindings.gnutls_anon_server_credentials_t
| `Certificate of
Nettls_gnutls_bindings.gnutls_certificate_credentials_t
| `Psk_client of Nettls_gnutls_bindings.gnutls_psk_client_credentials_t
| `Psk_server of Nettls_gnutls_bindings.gnutls_psk_server_credentials_t
| `Srp_client of Nettls_gnutls_bindings.gnutls_srp_client_credentials_t
| `Srp_server of Nettls_gnutls_bindings.gnutls_srp_server_credentials_t ]
val gnutls_credentials_set :
Nettls_gnutls_bindings.gnutls_session_t ->
Nettls_gnutls_bindings.gnutls_credentials -> unit
val b_set_pull_callback :
Nettls_gnutls_bindings.gnutls_session_t ->
(Nettls_gnutls_bindings.memory -> int) -> unit
val b_set_push_callback :
Nettls_gnutls_bindings.gnutls_session_t ->
(Nettls_gnutls_bindings.memory -> int -> int) -> unit
val b_set_pull_timeout_callback :
Nettls_gnutls_bindings.gnutls_session_t -> (int -> bool) -> unit
val b_set_verify_callback :
Nettls_gnutls_bindings.gnutls_session_t ->
(Nettls_gnutls_bindings.gnutls_session_t -> bool) -> unit
val set_fd :
Nettls_gnutls_bindings.gnutls_session_t -> Unix.file_descr -> unit
val b_set_db_callbacks :
Nettls_gnutls_bindings.gnutls_session_t ->
(string -> string -> unit) ->
(string -> unit) -> (string -> string) -> unit
val string_of_verification_status_flag :
Nettls_gnutls_bindings.gnutls_certificate_status_t_flag -> string
val gnutls_x509_crt_list_import :
string ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t ->
Nettls_gnutls_bindings.gnutls_certificate_import_flags ->
Nettls_gnutls_bindings.gnutls_x509_crt_t array
val gnutls_x509_crl_list_import :
string ->
Nettls_gnutls_bindings.gnutls_x509_crt_fmt_t ->
Nettls_gnutls_bindings.gnutls_certificate_import_flags ->
Nettls_gnutls_bindings.gnutls_x509_crl_t array
end`