ch01.html
Prev
ch01.html
Up
index.html
Home
GNU TLS API Reference Manual
gnutls-extra.html
Next
gnutls
gnutls —
Synopsis
#define
gnutls-gnutls.html#LIBGNUTLS-VERSION:CAPS
LIBGNUTLS_VERSION
#define
gnutls-gnutls.html#HAVE-SSIZE-T:CAPS
HAVE_SSIZE_T
#define
gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-128-CBC:CAPS
GNUTLS_CIPHER_RIJNDAEL_128_CBC
#define
gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-256-CBC:CAPS
GNUTLS_CIPHER_RIJNDAEL_256_CBC
#define
gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-CBC:CAPS
GNUTLS_CIPHER_RIJNDAEL_CBC
#define
gnutls-gnutls.html#GNUTLS-CIPHER-ARCFOUR:CAPS
GNUTLS_CIPHER_ARCFOUR
enum
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
;
enum
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
;
enum
gnutls-gnutls.html#gnutls-params-type-t
gnutls_params_type_t
;
enum
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
;
#define
gnutls-gnutls.html#GNUTLS-MAC-SHA:CAPS
GNUTLS_MAC_SHA
#define
gnutls-gnutls.html#GNUTLS-DIG-SHA:CAPS
GNUTLS_DIG_SHA
enum
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
;
enum
gnutls-gnutls.html#gnutls-digest-algorithm-t
gnutls_digest_algorithm_t
;
#define
gnutls-gnutls.html#GNUTLS-MAX-ALGORITHM-NUM:CAPS
GNUTLS_MAX_ALGORITHM_NUM
#define
gnutls-gnutls.html#GNUTLS-COMP-ZLIB:CAPS
GNUTLS_COMP_ZLIB
enum
gnutls-gnutls.html#gnutls-compression-method-t
gnutls_compression_method_t
;
enum
gnutls-gnutls.html#gnutls-connection-end-t
gnutls_connection_end_t
;
enum
gnutls-gnutls.html#gnutls-alert-level-t
gnutls_alert_level_t
;
enum
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
;
enum
gnutls-gnutls.html#gnutls-handshake-description-t
gnutls_handshake_description_t
;
enum
gnutls-gnutls.html#gnutls-certificate-status-t
gnutls_certificate_status_t
;
enum
gnutls-gnutls.html#gnutls-certificate-request-t
gnutls_certificate_request_t
;
enum
gnutls-gnutls.html#gnutls-openpgp-key-status-t
gnutls_openpgp_key_status_t
;
enum
gnutls-gnutls.html#gnutls-close-request-t
gnutls_close_request_t
;
#define
gnutls-gnutls.html#GNUTLS-TLS1:CAPS
GNUTLS_TLS1
enum
gnutls-gnutls.html#gnutls-protocol-t
gnutls_protocol_t
;
enum
gnutls-gnutls.html#gnutls-certificate-type-t
gnutls_certificate_type_t
;
enum
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
;
enum
gnutls-gnutls.html#gnutls-pk-algorithm-t
gnutls_pk_algorithm_t
;
const char*
gnutls-gnutls.html#gnutls-pk-algorithm-get-name
gnutls_pk_algorithm_get_name
(
gnutls-gnutls.html#gnutls-pk-algorithm-t
gnutls_pk_algorithm_t
algorithm);
#define
gnutls-gnutls.html#GNUTLS-SIGN-RSA-SHA:CAPS
GNUTLS_SIGN_RSA_SHA
#define
gnutls-gnutls.html#GNUTLS-SIGN-DSA-SHA:CAPS
GNUTLS_SIGN_DSA_SHA
enum
gnutls-gnutls.html#gnutls-sign-algorithm-t
gnutls_sign_algorithm_t
;
const char*
gnutls-gnutls.html#gnutls-sign-algorithm-get-name
gnutls_sign_algorithm_get_name
(
gnutls-gnutls.html#gnutls-sign-algorithm-t
gnutls_sign_algorithm_t
algorithm);
typedef
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
;
struct
gnutls-gnutls.html#gnutls-session-int
gnutls_session_int
;
typedef
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
;
struct
gnutls-gnutls.html#gnutls-dh-params-int
gnutls_dh_params_int
;
typedef
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
;
gnutls-gnutls.html#gnutls-x509-privkey-int
gnutls_x509_privkey_int
;
typedef
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
;
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
;
int
gnutls-gnutls.html#gnutls-init
gnutls_init
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
*session,
gnutls-gnutls.html#gnutls-connection-end-t
gnutls_connection_end_t
con_end);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-deinit
gnutls_deinit
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-bye
gnutls_bye
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-close-request-t
gnutls_close_request_t
how);
int
gnutls-gnutls.html#gnutls-handshake
gnutls_handshake
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-rehandshake
gnutls_rehandshake
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
gnutls-gnutls.html#gnutls-alert-get
gnutls_alert_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-alert-send
gnutls_alert_send
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-alert-level-t
gnutls_alert_level_t
level,
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
desc);
int
gnutls-gnutls.html#gnutls-alert-send-appropriate
gnutls_alert_send_appropriate
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int err);
const char*
gnutls-gnutls.html#gnutls-alert-get-name
gnutls_alert_get_name
(
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
alert);
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
gnutls-gnutls.html#gnutls-cipher-get
gnutls_cipher_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
gnutls-gnutls.html#gnutls-kx-get
gnutls_kx_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
gnutls-gnutls.html#gnutls-mac-get
gnutls_mac_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-compression-method-t
gnutls_compression_method_t
gnutls-gnutls.html#gnutls-compression-get
gnutls_compression_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-certificate-type-t
gnutls_certificate_type_t
gnutls-gnutls.html#gnutls-certificate-type-get
gnutls_certificate_type_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
size_t
gnutls-gnutls.html#gnutls-cipher-get-key-size
gnutls_cipher_get_key_size
(
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
algorithm);
const char*
gnutls-gnutls.html#gnutls-cipher-get-name
gnutls_cipher_get_name
(
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
algorithm);
const char*
gnutls-gnutls.html#gnutls-mac-get-name
gnutls_mac_get_name
(
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
algorithm);
const char*
gnutls-gnutls.html#gnutls-compression-get-name
gnutls_compression_get_name
(
gnutls-gnutls.html#gnutls-compression-method-t
gnutls_compression_method_t
algorithm);
const char*
gnutls-gnutls.html#gnutls-kx-get-name
gnutls_kx_get_name
(
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
algorithm);
const char*
gnutls-gnutls.html#gnutls-certificate-type-get-name
gnutls_certificate_type_get_name
(
gnutls-gnutls.html#gnutls-certificate-type-t
gnutls_certificate_type_t
type);
int
gnutls-gnutls.html#gnutls-error-is-fatal
gnutls_error_is_fatal
(int error);
int
gnutls-gnutls.html#gnutls-error-to-alert
gnutls_error_to_alert
(int err,
int *level);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-perror
gnutls_perror
(int error);
const char*
gnutls-gnutls.html#gnutls-strerror
gnutls_strerror
(int error);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-handshake-set-private-extensions
gnutls_handshake_set_private_extensions
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int allow);
gnutls-gnutls.html#gnutls-handshake-description-t
gnutls_handshake_description_t
gnutls-gnutls.html#gnutls-handshake-get-last-out
gnutls_handshake_get_last_out
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-handshake-description-t
gnutls_handshake_description_t
gnutls-gnutls.html#gnutls-handshake-get-last-in
gnutls_handshake_get_last_in
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
ssize_t
gnutls-gnutls.html#gnutls-record-send
gnutls_record_send
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const
../shishi/shishi-shishi.html#void
void
*data,
size_t sizeofdata);
ssize_t
gnutls-gnutls.html#gnutls-record-recv
gnutls_record_recv
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*data,
size_t sizeofdata);
#define
gnutls-gnutls.html#gnutls-read
gnutls_read
#define
gnutls-gnutls.html#gnutls-write
gnutls_write
int
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
size_t
gnutls-gnutls.html#gnutls-record-get-max-size
gnutls_record_get_max_size
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
ssize_t
gnutls-gnutls.html#gnutls-record-set-max-size
gnutls_record_set_max_size
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
size_t size);
size_t
gnutls-gnutls.html#gnutls-record-check-pending
gnutls_record_check_pending
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
enum
gnutls-gnutls.html#gnutls-server-name-type-t
gnutls_server_name_type_t
;
int
gnutls-gnutls.html#gnutls-server-name-set
gnutls_server_name_set
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-server-name-type-t
gnutls_server_name_type_t
type,
const
../shishi/shishi-shishi.html#void
void
*name,
size_t name_length);
int
gnutls-gnutls.html#gnutls-server-name-get
gnutls_server_name_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*data,
size_t *data_length,
unsigned int *type,
unsigned int indx);
int
gnutls-gnutls.html#gnutls-cipher-set-priority
gnutls_cipher_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-mac-set-priority
gnutls_mac_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-compression-set-priority
gnutls_compression_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-kx-set-priority
gnutls_kx_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-protocol-set-priority
gnutls_protocol_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-certificate-type-set-priority
gnutls_certificate_type_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
int
gnutls-gnutls.html#gnutls-set-default-priority
gnutls_set_default_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-set-default-export-priority
gnutls_set_default_export_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
const char*
gnutls-gnutls.html#gnutls-cipher-suite-get-name
gnutls_cipher_suite_get_name
(
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
kx_algorithm,
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
cipher_algorithm,
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
mac_algorithm);
gnutls-gnutls.html#gnutls-protocol-t
gnutls_protocol_t
gnutls-gnutls.html#gnutls-protocol-get-version
gnutls_protocol_get_version
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
const char*
gnutls-gnutls.html#gnutls-protocol-get-name
gnutls_protocol_get_name
(
gnutls-gnutls.html#gnutls-protocol-t
gnutls_protocol_t
version);
int
gnutls-gnutls.html#gnutls-session-set-data
gnutls_session_set_data
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const
../shishi/shishi-shishi.html#void
void
*session_data,
size_t session_data_size);
int
gnutls-gnutls.html#gnutls-session-get-data
gnutls_session_get_data
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*session_data,
size_t *session_data_size);
#define
gnutls-gnutls.html#GNUTLS-MAX-SESSION-ID:CAPS
GNUTLS_MAX_SESSION_ID
int
gnutls-gnutls.html#gnutls-session-get-id
gnutls_session_get_id
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*session_id,
size_t *session_id_size);
int
gnutls-gnutls.html#gnutls-session-is-resumed
gnutls_session_is_resumed
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int         (
gnutls-gnutls.html#gnutls-db-store-func
*gnutls_db_store_func
)         (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
data);
int         (
gnutls-gnutls.html#gnutls-db-remove-func
*gnutls_db_remove_func
)        (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key);
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
(
gnutls-gnutls.html#gnutls-db-retr-func
*gnutls_db_retr_func
)       (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-set-cache-expiration
gnutls_db_set_cache_expiration
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int seconds);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-remove-session
gnutls_db_remove_session
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-set-retrieve-function
gnutls_db_set_retrieve_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-retr-func
gnutls_db_retr_func
retr_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-set-remove-function
gnutls_db_set_remove_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-remove-func
gnutls_db_remove_func
rem_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-set-store-function
gnutls_db_set_store_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-store-func
gnutls_db_store_func
store_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-db-set-ptr
gnutls_db_set_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*ptr);
../shishi/shishi-shishi.html#void
void
*
gnutls-gnutls.html#gnutls-db-get-ptr
gnutls_db_get_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-db-check-entry
gnutls_db_check_entry
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
session_entry);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-handshake-set-max-packet-length
gnutls_handshake_set_max_packet_length
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int max);
const char*
gnutls-gnutls.html#gnutls-check-version
gnutls_check_version
(const char *req_version);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-credentials-clear
gnutls_credentials_clear
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-credentials-set
gnutls_credentials_set
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
type,
../shishi/shishi-shishi.html#void
void
*cred);
#define
gnutls-gnutls.html#gnutls-cred-set
gnutls_cred_set
struct
gnutls-gnutls.html#gnutls-certificate-credentials-st
gnutls_certificate_credentials_st
;
typedef
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
;
typedef
gnutls-gnutls.html#gnutls-certificate-server-credentials
gnutls_certificate_server_credentials
;
typedef
gnutls-gnutls.html#gnutls-certificate-client-credentials
gnutls_certificate_client_credentials
;
typedef
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
;
typedef
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
;
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-anon-free-server-credentials
gnutls_anon_free_server_credentials
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
sc);
int
gnutls-gnutls.html#gnutls-anon-allocate-server-credentials
gnutls_anon_allocate_server_credentials
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
*sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-anon-set-server-dh-params
gnutls_anon_set_server_dh_params
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
res,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-anon-free-client-credentials
gnutls_anon_free_client_credentials
(
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
sc);
int
gnutls-gnutls.html#gnutls-anon-allocate-client-credentials
gnutls_anon_allocate_client_credentials
(
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
*sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-free-credentials
gnutls_certificate_free_credentials
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
int
gnutls-gnutls.html#gnutls-certificate-allocate-credentials
gnutls_certificate_allocate_credentials
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
*res);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-free-keys
gnutls_certificate_free_keys
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-free-cas
gnutls_certificate_free_cas
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-free-ca-names
gnutls_certificate_free_ca_names
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-free-crls
gnutls_certificate_free_crls
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-set-dh-params
gnutls_certificate_set_dh_params
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-set-rsa-export-params
gnutls_certificate_set_rsa_export_params
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-set-verify-flags
gnutls_certificate_set_verify_flags
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
unsigned int flags);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-set-verify-limits
gnutls_certificate_set_verify_limits
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
unsigned int max_bits,
unsigned int max_depth);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-trust-file
gnutls_certificate_set_x509_trust_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *CAFILE,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-trust-mem
gnutls_certificate_set_x509_trust_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CA,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-crl-file
gnutls_certificate_set_x509_crl_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *crlfile,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-crl-mem
gnutls_certificate_set_x509_crl_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CRL,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-key-file
gnutls_certificate_set_x509_key_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *CERTFILE,
const char *KEYFILE,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem
gnutls_certificate_set_x509_key_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CERT,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*KEY,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
typedef
gnutls-gnutls.html#gnutls-x509-privkey-t
gnutls_x509_privkey_t
;
gnutls-gnutls.html#gnutls-x509-crl-int
gnutls_x509_crl_int
;
typedef
gnutls-gnutls.html#gnutls-x509-crl-t
gnutls_x509_crl_t
;
gnutls-gnutls.html#gnutls-x509-crt-int
gnutls_x509_crt_int
;
typedef
gnutls-gnutls.html#gnutls-x509-crt-t
gnutls_x509_crt_t
;
int
gnutls-gnutls.html#gnutls-certificate-set-x509-key
gnutls_certificate_set_x509_key
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crt-t
gnutls_x509_crt_t
*cert_list,
int cert_list_size,
gnutls-gnutls.html#gnutls-x509-privkey-t
gnutls_x509_privkey_t
key);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-trust
gnutls_certificate_set_x509_trust
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crt-t
gnutls_x509_crt_t
*ca_list,
int ca_list_size);
int
gnutls-gnutls.html#gnutls-certificate-set-x509-crl
gnutls_certificate_set_x509_crl
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crl-t
gnutls_x509_crl_t
*crl_list,
int crl_list_size);
int
gnutls-gnutls.html#gnutls-global-init
gnutls_global_init
(void);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-global-deinit
gnutls_global_deinit
(void);
../shishi/shishi-shishi.html#void
void
*       (
gnutls-gnutls.html#gnutls-alloc-function
*gnutls_alloc_function
)        (size_t);
../shishi/shishi-shishi.html#void
void
*       (
gnutls-gnutls.html#gnutls-calloc-function
*gnutls_calloc_function
)       (size_t,
size_t);
int         (
gnutls-gnutls.html#gnutls-is-secure-function
*gnutls_is_secure_function
)    (const
../shishi/shishi-shishi.html#void
void
*);
../shishi/shishi-shishi.html#void
void
(
gnutls-gnutls.html#gnutls-free-function
*gnutls_free_function
)         (
../shishi/shishi-shishi.html#void
void
*);
../shishi/shishi-shishi.html#void
void
*       (
gnutls-gnutls.html#gnutls-realloc-function
*gnutls_realloc_function
)      (
../shishi/shishi-shishi.html#void
void
*,
size_t);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-global-set-mem-functions
gnutls_global_set_mem_functions
(
gnutls-gnutls.html#gnutls-alloc-function
gnutls_alloc_function
alloc_func,
gnutls-gnutls.html#gnutls-alloc-function
gnutls_alloc_function
secure_alloc_func,
gnutls-gnutls.html#gnutls-is-secure-function
gnutls_is_secure_function
is_secure_func,
gnutls-gnutls.html#gnutls-realloc-function
gnutls_realloc_function
realloc_func,
gnutls-gnutls.html#gnutls-free-function
gnutls_free_function
free_func);
extern      gnutls_alloc_function
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc
;
extern      gnutls_alloc_function
gnutls-gnutls.html#gnutls-secure-malloc
gnutls_secure_malloc
;
extern      gnutls_realloc_function
gnutls-gnutls.html#gnutls-realloc
gnutls_realloc
;
extern      gnutls_calloc_function
gnutls-gnutls.html#gnutls-calloc
gnutls_calloc
;
extern      gnutls_free_function
gnutls-gnutls.html#gnutls-free
gnutls_free
;
../shishi/shishi-shishi.html#void
void
(
gnutls-gnutls.html#gnutls-log-func
*gnutls_log_func
)              (...,
const char*);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-global-set-log-function
gnutls_global_set_log_function
(
gnutls-gnutls.html#gnutls-log-func
gnutls_log_func
log_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-global-set-log-level
gnutls_global_set_log_level
(int level);
int
gnutls-gnutls.html#gnutls-dh-params-init
gnutls_dh_params_init
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
*dh_params);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-dh-params-deinit
gnutls_dh_params_deinit
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
int
gnutls-gnutls.html#gnutls-dh-params-import-raw
gnutls_dh_params_import_raw
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator);
int
gnutls-gnutls.html#gnutls-dh-params-import-pkcs3
gnutls_dh_params_import_pkcs3
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*pkcs3_params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format);
int
gnutls-gnutls.html#gnutls-dh-params-generate2
gnutls_dh_params_generate2
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
unsigned int bits);
int
gnutls-gnutls.html#gnutls-dh-params-export-pkcs3
gnutls_dh_params_export_pkcs3
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format,
unsigned char *params_data,
size_t *params_data_size);
int
gnutls-gnutls.html#gnutls-dh-params-export-raw
gnutls_dh_params_export_raw
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator,
unsigned int *bits);
int
gnutls-gnutls.html#gnutls-dh-params-cpy
gnutls_dh_params_cpy
(
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dst,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
src);
int
gnutls-gnutls.html#gnutls-rsa-params-init
gnutls_rsa_params_init
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
*rsa_params);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-rsa-params-deinit
gnutls_rsa_params_deinit
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params);
int
gnutls-gnutls.html#gnutls-rsa-params-cpy
gnutls_rsa_params_cpy
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
dst,
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
src);
int
gnutls-gnutls.html#gnutls-rsa-params-import-raw
gnutls_rsa_params_import_raw
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*m,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*e,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*d,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*p,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*q,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*u);
int
gnutls-gnutls.html#gnutls-rsa-params-generate2
gnutls_rsa_params_generate2
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
unsigned int bits);
int
gnutls-gnutls.html#gnutls-rsa-params-export-raw
gnutls_rsa_params_export_raw
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*m,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*e,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*d,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*p,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*q,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*u,
unsigned int *bits);
int
gnutls-gnutls.html#gnutls-rsa-params-export-pkcs1
gnutls_rsa_params_export_pkcs1
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format,
unsigned char *params_data,
size_t *params_data_size);
int
gnutls-gnutls.html#gnutls-rsa-params-import-pkcs1
gnutls_rsa_params_import_pkcs1
(
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*pkcs1_params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format);
ssize_t     (
gnutls-gnutls.html#gnutls-pull-func
*gnutls_pull_func
)             (
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
,
../shishi/shishi-shishi.html#void
void
*,
size_t);
ssize_t     (
gnutls-gnutls.html#gnutls-push-func
*gnutls_push_func
)             (
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
,
const
../shishi/shishi-shishi.html#void
void
*,
size_t);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-set-ptr
gnutls_transport_set_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
ptr);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-set-ptr2
gnutls_transport_set_ptr2
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
recv_ptr,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
send_ptr);
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
gnutls-gnutls.html#gnutls-transport-get-ptr
gnutls_transport_get_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-get-ptr2
gnutls_transport_get_ptr2
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
*recv_ptr,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
*send_ptr);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-set-lowat
gnutls_transport_set_lowat
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int num);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-set-push-function
gnutls_transport_set_push_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-push-func
gnutls_push_func
push_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-transport-set-pull-function
gnutls_transport_set_pull_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-pull-func
gnutls_pull_func
pull_func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-session-set-ptr
gnutls_session_set_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*ptr);
../shishi/shishi-shishi.html#void
void
*
gnutls-gnutls.html#gnutls-session-get-ptr
gnutls_session_get_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-openpgp-send-key
gnutls_openpgp_send_key
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-openpgp-key-status-t
gnutls_openpgp_key_status_t
status);
int
gnutls-gnutls.html#gnutls-fingerprint
gnutls_fingerprint
(
gnutls-gnutls.html#gnutls-digest-algorithm-t
gnutls_digest_algorithm_t
algo,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
../shishi/shishi-shishi.html#void
void
*result,
size_t *result_size);
typedef
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
;
typedef
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
;
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-srp-free-client-credentials
gnutls_srp_free_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
sc);
int
gnutls-gnutls.html#gnutls-srp-allocate-client-credentials
gnutls_srp_allocate_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
*sc);
int
gnutls-gnutls.html#gnutls-srp-set-client-credentials
gnutls_srp_set_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
res,
char *username,
char *password);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-srp-free-server-credentials
gnutls_srp_free_server_credentials
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
sc);
int
gnutls-gnutls.html#gnutls-srp-allocate-server-credentials
gnutls_srp_allocate_server_credentials
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
*sc);
int
gnutls-gnutls.html#gnutls-srp-set-server-credentials-file
gnutls_srp_set_server_credentials_file
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
res,
const char *password_file,
const char *password_conf_file);
const char*
gnutls-gnutls.html#gnutls-srp-server-get-username
gnutls_srp_server_get_username
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-srp-verifier
gnutls_srp_verifier
(const char *username,
const char *password,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*salt,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*res);
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-2048-group-prime
gnutls_srp_2048_group_prime
;
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-2048-group-generator
gnutls_srp_2048_group_generator
;
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-1536-group-prime
gnutls_srp_1536_group_prime
;
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-1536-group-generator
gnutls_srp_1536_group_generator
;
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-1024-group-prime
gnutls_srp_1024_group_prime
;
extern      const gnutls_datum_t
gnutls-gnutls.html#gnutls-srp-1024-group-generator
gnutls_srp_1024_group_generator
;
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-srp-set-server-credentials-function
gnutls_srp_set_server_credentials_function
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
cred,
gnutls_srp_server_credentials_function *func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-srp-set-client-credentials-function
gnutls_srp_set_client_credentials_function
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
cred,
gnutls_srp_client_credentials_function *func);
int
gnutls-gnutls.html#gnutls-srp-base64-encode
gnutls_srp_base64_encode
(const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
char *result,
int *result_size);
int
gnutls-gnutls.html#gnutls-srp-base64-encode-alloc
gnutls_srp_base64_encode_alloc
(const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
int
gnutls-gnutls.html#gnutls-srp-base64-decode
gnutls_srp_base64_decode
(const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
char *result,
int *result_size);
int
gnutls-gnutls.html#gnutls-srp-base64-decode-alloc
gnutls_srp_base64_decode_alloc
(const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
#define
gnutls-gnutls.html#GNUTLS-UI-H:CAPS
GNUTLS_UI_H
enum
gnutls-gnutls.html#gnutls-x509-subject-alt-name-t
gnutls_x509_subject_alt_name_t
;
gnutls-gnutls.html#gnutls-openpgp-key-int
gnutls_openpgp_key_int
;
typedef
gnutls-gnutls.html#gnutls-openpgp-key-t
gnutls_openpgp_key_t
;
gnutls-gnutls.html#gnutls-openpgp-privkey-int
gnutls_openpgp_privkey_int
;
typedef
gnutls-gnutls.html#gnutls-openpgp-privkey-t
gnutls_openpgp_privkey_t
;
gnutls-gnutls.html#key
key
;
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls-gnutls.html#gnutls-auth-get-type
gnutls_auth_get_type
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls-gnutls.html#gnutls-auth-server-get-type
gnutls_auth_server_get_type
(gnutls_session_tsession);
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls-gnutls.html#gnutls-auth-client-get-type
gnutls_auth_client_get_type
(gnutls_session_tsession);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-dh-set-prime-bits
gnutls_dh_set_prime_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
unsigned int bits);
int
gnutls-gnutls.html#gnutls-dh-get-secret-bits
gnutls_dh_get_secret_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-dh-get-peers-public-bits
gnutls_dh_get_peers_public_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-dh-get-prime-bits
gnutls_dh_get_prime_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-dh-get-group
gnutls_dh_get_group
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_gen,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_prime);
int
gnutls-gnutls.html#gnutls-dh-get-pubkey
gnutls_dh_get_pubkey
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_key);
int
gnutls-gnutls.html#gnutls-rsa-export-get-pubkey
gnutls_rsa_export_get_pubkey
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*exponent,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*modulus);
int
gnutls-gnutls.html#gnutls-rsa-export-get-modulus-bits
gnutls_rsa_export_get_modulus_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-client-set-retrieve-function
gnutls_certificate_client_set_retrieve_function
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
cred,
gnutls_certificate_client_retrieve_function *func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-server-set-retrieve-function
gnutls_certificate_server_set_retrieve_function
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
cred,
gnutls_certificate_server_retrieve_function *func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-server-set-request
gnutls_certificate_server_set_request
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls_certificate_request_treq);
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*
gnutls-gnutls.html#gnutls-certificate-get-peers
gnutls_certificate_get_peers
(gnutls_session_tsession,
unsigned int *list_size);
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*
gnutls-gnutls.html#gnutls-certificate-get-ours
gnutls_certificate_get_ours
(gnutls_session_tsession);
time_t
gnutls-gnutls.html#gnutls-certificate-activation-time-peers
gnutls_certificate_activation_time_peers
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
time_t
gnutls-gnutls.html#gnutls-certificate-expiration-time-peers
gnutls_certificate_expiration_time_peers
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-certificate-client-get-request-status
gnutls_certificate_client_get_request_status
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-certificate-verify-peers2
gnutls_certificate_verify_peers2
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
unsigned int *status);
int
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
int
gnutls-gnutls.html#gnutls-pem-base64-encode
gnutls_pem_base64_encode
(const char *msg,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
char *result,
size_t *result_size);
int
gnutls-gnutls.html#gnutls-pem-base64-decode
gnutls_pem_base64_decode
(const char *header,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
unsigned char *result,
size_t *result_size);
int
gnutls-gnutls.html#gnutls-pem-base64-encode-alloc
gnutls_pem_base64_encode_alloc
(const char *msg,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
int
gnutls-gnutls.html#gnutls-pem-base64-decode-alloc
gnutls_pem_base64_decode_alloc
(const char *header,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
#define
gnutls-gnutls.html#GNUTLS-KEY-DIGITAL-SIGNATURE:CAPS
GNUTLS_KEY_DIGITAL_SIGNATURE
#define
gnutls-gnutls.html#GNUTLS-KEY-NON-REPUDIATION:CAPS
GNUTLS_KEY_NON_REPUDIATION
#define
gnutls-gnutls.html#GNUTLS-KEY-KEY-ENCIPHERMENT:CAPS
GNUTLS_KEY_KEY_ENCIPHERMENT
#define
gnutls-gnutls.html#GNUTLS-KEY-DATA-ENCIPHERMENT:CAPS
GNUTLS_KEY_DATA_ENCIPHERMENT
#define
gnutls-gnutls.html#GNUTLS-KEY-KEY-AGREEMENT:CAPS
GNUTLS_KEY_KEY_AGREEMENT
#define
gnutls-gnutls.html#GNUTLS-KEY-KEY-CERT-SIGN:CAPS
GNUTLS_KEY_KEY_CERT_SIGN
#define
gnutls-gnutls.html#GNUTLS-KEY-CRL-SIGN:CAPS
GNUTLS_KEY_CRL_SIGN
#define
gnutls-gnutls.html#GNUTLS-KEY-ENCIPHER-ONLY:CAPS
GNUTLS_KEY_ENCIPHER_ONLY
#define
gnutls-gnutls.html#GNUTLS-KEY-DECIPHER-ONLY:CAPS
GNUTLS_KEY_DECIPHER_ONLY
gnutls-gnutls.html#gnutls-params-st
gnutls_params_st
;
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-certificate-set-params-function
gnutls_certificate_set_params_function
(gnutls_certificate_credentials_tres,
gnutls_params_function *func);
../shishi/shishi-shishi.html#void
void
gnutls-gnutls.html#gnutls-anon-set-params-function
gnutls_anon_set_params_function
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
res,
gnutls_params_function *func);
#define
gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS
GNUTLS_E_SUCCESS
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-COMPRESSION-ALGORITHM:CAPS
GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-TYPE:CAPS
GNUTLS_E_UNKNOWN_CIPHER_TYPE
#define
gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS
GNUTLS_E_LARGE_PACKET
#define
gnutls-gnutls.html#GNUTLS-E-UNSUPPORTED-VERSION-PACKET:CAPS
GNUTLS_E_UNSUPPORTED_VERSION_PACKET
#define
gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-PACKET-LENGTH:CAPS
GNUTLS_E_UNEXPECTED_PACKET_LENGTH
#define
gnutls-gnutls.html#GNUTLS-E-INVALID-SESSION:CAPS
GNUTLS_E_INVALID_SESSION
#define
gnutls-gnutls.html#GNUTLS-E-FATAL-ALERT-RECEIVED:CAPS
GNUTLS_E_FATAL_ALERT_RECEIVED
#define
gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-PACKET:CAPS
GNUTLS_E_UNEXPECTED_PACKET
#define
gnutls-gnutls.html#GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS
GNUTLS_E_WARNING_ALERT_RECEIVED
#define
gnutls-gnutls.html#GNUTLS-E-ERROR-IN-FINISHED-PACKET:CAPS
GNUTLS_E_ERROR_IN_FINISHED_PACKET
#define
gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-HANDSHAKE-PACKET:CAPS
GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-SUITE:CAPS
GNUTLS_E_UNKNOWN_CIPHER_SUITE
#define
gnutls-gnutls.html#GNUTLS-E-UNWANTED-ALGORITHM:CAPS
GNUTLS_E_UNWANTED_ALGORITHM
#define
gnutls-gnutls.html#GNUTLS-E-MPI-SCAN-FAILED:CAPS
GNUTLS_E_MPI_SCAN_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-DECRYPTION-FAILED:CAPS
GNUTLS_E_DECRYPTION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-MEMORY-ERROR:CAPS
GNUTLS_E_MEMORY_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-DECOMPRESSION-FAILED:CAPS
GNUTLS_E_DECOMPRESSION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-COMPRESSION-FAILED:CAPS
GNUTLS_E_COMPRESSION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS
GNUTLS_E_AGAIN
#define
gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS
GNUTLS_E_EXPIRED
#define
gnutls-gnutls.html#GNUTLS-E-DB-ERROR:CAPS
GNUTLS_E_DB_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-SRP-PWD-ERROR:CAPS
GNUTLS_E_SRP_PWD_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-INSUFFICIENT-CREDENTIALS:CAPS
GNUTLS_E_INSUFFICIENT_CREDENTIALS
#define
gnutls-gnutls.html#GNUTLS-E-INSUFICIENT-CREDENTIALS:CAPS
GNUTLS_E_INSUFICIENT_CREDENTIALS
#define
gnutls-gnutls.html#GNUTLS-E-INSUFFICIENT-CRED:CAPS
GNUTLS_E_INSUFFICIENT_CRED
#define
gnutls-gnutls.html#GNUTLS-E-INSUFICIENT-CRED:CAPS
GNUTLS_E_INSUFICIENT_CRED
#define
gnutls-gnutls.html#GNUTLS-E-HASH-FAILED:CAPS
GNUTLS_E_HASH_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-BASE64-DECODING-ERROR:CAPS
GNUTLS_E_BASE64_DECODING_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-MPI-PRINT-FAILED:CAPS
GNUTLS_E_MPI_PRINT_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS
GNUTLS_E_REHANDSHAKE
#define
gnutls-gnutls.html#GNUTLS-E-GOT-APPLICATION-DATA:CAPS
GNUTLS_E_GOT_APPLICATION_DATA
#define
gnutls-gnutls.html#GNUTLS-E-RECORD-LIMIT-REACHED:CAPS
GNUTLS_E_RECORD_LIMIT_REACHED
#define
gnutls-gnutls.html#GNUTLS-E-ENCRYPTION-FAILED:CAPS
GNUTLS_E_ENCRYPTION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-PK-ENCRYPTION-FAILED:CAPS
GNUTLS_E_PK_ENCRYPTION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-PK-DECRYPTION-FAILED:CAPS
GNUTLS_E_PK_DECRYPTION_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-PK-SIGN-FAILED:CAPS
GNUTLS_E_PK_SIGN_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-CRITICAL-EXTENSION:CAPS
GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION
#define
gnutls-gnutls.html#GNUTLS-E-KEY-USAGE-VIOLATION:CAPS
GNUTLS_E_KEY_USAGE_VIOLATION
#define
gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS
GNUTLS_E_NO_CERTIFICATE_FOUND
#define
gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS
GNUTLS_E_INVALID_REQUEST
#define
gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS
GNUTLS_E_SHORT_MEMORY_BUFFER
#define
gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS
GNUTLS_E_INTERRUPTED
#define
gnutls-gnutls.html#GNUTLS-E-PUSH-ERROR:CAPS
GNUTLS_E_PUSH_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-PULL-ERROR:CAPS
GNUTLS_E_PULL_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-RECEIVED-ILLEGAL-PARAMETER:CAPS
GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER
#define
gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE
#define
gnutls-gnutls.html#GNUTLS-E-PKCS1-WRONG-PAD:CAPS
GNUTLS_E_PKCS1_WRONG_PAD
#define
gnutls-gnutls.html#GNUTLS-E-RECEIVED-ILLEGAL-EXTENSION:CAPS
GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION
#define
gnutls-gnutls.html#GNUTLS-E-INTERNAL-ERROR:CAPS
GNUTLS_E_INTERNAL_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-DH-PRIME-UNACCEPTABLE:CAPS
GNUTLS_E_DH_PRIME_UNACCEPTABLE
#define
gnutls-gnutls.html#GNUTLS-E-FILE-ERROR:CAPS
GNUTLS_E_FILE_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-TOO-MANY-EMPTY-PACKETS:CAPS
GNUTLS_E_TOO_MANY_EMPTY_PACKETS
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PK-ALGORITHM:CAPS
GNUTLS_E_UNKNOWN_PK_ALGORITHM
#define
gnutls-gnutls.html#GNUTLS-E-INIT-LIBEXTRA:CAPS
GNUTLS_E_INIT_LIBEXTRA
#define
gnutls-gnutls.html#GNUTLS-E-LIBRARY-VERSION-MISMATCH:CAPS
GNUTLS_E_LIBRARY_VERSION_MISMATCH
#define
gnutls-gnutls.html#GNUTLS-E-NO-TEMPORARY-RSA-PARAMS:CAPS
GNUTLS_E_NO_TEMPORARY_RSA_PARAMS
#define
gnutls-gnutls.html#GNUTLS-E-LZO-INIT-FAILED:CAPS
GNUTLS_E_LZO_INIT_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-NO-COMPRESSION-ALGORITHMS:CAPS
GNUTLS_E_NO_COMPRESSION_ALGORITHMS
#define
gnutls-gnutls.html#GNUTLS-E-NO-CIPHER-SUITES:CAPS
GNUTLS_E_NO_CIPHER_SUITES
#define
gnutls-gnutls.html#GNUTLS-E-OPENPGP-GETKEY-FAILED:CAPS
GNUTLS_E_OPENPGP_GETKEY_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-PK-SIG-VERIFY-FAILED:CAPS
GNUTLS_E_PK_SIG_VERIFY_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-ILLEGAL-SRP-USERNAME:CAPS
GNUTLS_E_ILLEGAL_SRP_USERNAME
#define
gnutls-gnutls.html#GNUTLS-E-SRP-PWD-PARSING-ERROR:CAPS
GNUTLS_E_SRP_PWD_PARSING_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-NO-TEMPORARY-DH-PARAMS:CAPS
GNUTLS_E_NO_TEMPORARY_DH_PARAMS
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-ELEMENT-NOT-FOUND:CAPS
GNUTLS_E_ASN1_ELEMENT_NOT_FOUND
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-IDENTIFIER-NOT-FOUND:CAPS
GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-DER-ERROR:CAPS
GNUTLS_E_ASN1_DER_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-VALUE-NOT-FOUND:CAPS
GNUTLS_E_ASN1_VALUE_NOT_FOUND
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-GENERIC-ERROR:CAPS
GNUTLS_E_ASN1_GENERIC_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-VALUE-NOT-VALID:CAPS
GNUTLS_E_ASN1_VALUE_NOT_VALID
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-TAG-ERROR:CAPS
GNUTLS_E_ASN1_TAG_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-TAG-IMPLICIT:CAPS
GNUTLS_E_ASN1_TAG_IMPLICIT
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-TYPE-ANY-ERROR:CAPS
GNUTLS_E_ASN1_TYPE_ANY_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-SYNTAX-ERROR:CAPS
GNUTLS_E_ASN1_SYNTAX_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-ASN1-DER-OVERFLOW:CAPS
GNUTLS_E_ASN1_DER_OVERFLOW
#define
gnutls-gnutls.html#GNUTLS-E-OPENPGP-TRUSTDB-VERSION-UNSUPPORTED:CAPS
GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED
#define
gnutls-gnutls.html#GNUTLS-E-OPENPGP-UID-REVOKED:CAPS
GNUTLS_E_OPENPGP_UID_REVOKED
#define
gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-ERROR:CAPS
GNUTLS_E_CERTIFICATE_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-X509-CERTIFICATE-ERROR:CAPS
GNUTLS_E_X509_CERTIFICATE_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS
GNUTLS_E_CERTIFICATE_KEY_MISMATCH
#define
gnutls-gnutls.html#GNUTLS-E-UNSUPPORTED-CERTIFICATE-TYPE:CAPS
GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE
#define
gnutls-gnutls.html#GNUTLS-E-X509-UNKNOWN-SAN:CAPS
GNUTLS_E_X509_UNKNOWN_SAN
#define
gnutls-gnutls.html#GNUTLS-E-OPENPGP-FINGERPRINT-UNSUPPORTED:CAPS
GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED
#define
gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-ATTRIBUTE:CAPS
GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-HASH-ALGORITHM:CAPS
GNUTLS_E_UNKNOWN_HASH_ALGORITHM
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PKCS-CONTENT-TYPE:CAPS
GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE
#define
gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PKCS-BAG-TYPE:CAPS
GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE
#define
gnutls-gnutls.html#GNUTLS-E-INVALID-PASSWORD:CAPS
GNUTLS_E_INVALID_PASSWORD
#define
gnutls-gnutls.html#GNUTLS-E-MAC-VERIFY-FAILED:CAPS
GNUTLS_E_MAC_VERIFY_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-CONSTRAINT-ERROR:CAPS
GNUTLS_E_CONSTRAINT_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-BASE64-ENCODING-ERROR:CAPS
GNUTLS_E_BASE64_ENCODING_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-GCRYPT-LIBRARY:CAPS
GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY
#define
gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-CRYPTO-LIBRARY:CAPS
GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY
#define
gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-LIBTASN1-LIBRARY:CAPS
GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY
#define
gnutls-gnutls.html#GNUTLS-E-OPENPGP-KEYRING-ERROR:CAPS
GNUTLS_E_OPENPGP_KEYRING_ERROR
#define
gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-OID:CAPS
GNUTLS_E_X509_UNSUPPORTED_OID
#define
gnutls-gnutls.html#GNUTLS-E-RANDOM-FAILED:CAPS
GNUTLS_E_RANDOM_FAILED
#define
gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS
GNUTLS_E_UNIMPLEMENTED_FEATURE
Description
Details
LIBGNUTLS_VERSION
#define LIBGNUTLS_VERSION "1.2.5"
HAVE_SSIZE_T
# define HAVE_SSIZE_T
GNUTLS_CIPHER_RIJNDAEL_128_CBC
#define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC
GNUTLS_CIPHER_RIJNDAEL_256_CBC
#define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC
GNUTLS_CIPHER_RIJNDAEL_CBC
#define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC
GNUTLS_CIPHER_ARCFOUR
#define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128
enum gnutls_cipher_algorithm_t
typedef enum gnutls_cipher_algorithm { GNUTLS_CIPHER_NULL = 1,
GNUTLS_CIPHER_ARCFOUR_128, GNUTLS_CIPHER_3DES_CBC,
GNUTLS_CIPHER_AES_128_CBC, GNUTLS_CIPHER_AES_256_CBC,
GNUTLS_CIPHER_ARCFOUR_40,
GNUTLS_CIPHER_RC2_40_CBC = 90, GNUTLS_CIPHER_DES_CBC
} gnutls_cipher_algorithm_t;
enum gnutls_kx_algorithm_t
typedef enum { GNUTLS_KX_RSA=1, GNUTLS_KX_DHE_DSS,
GNUTLS_KX_DHE_RSA, GNUTLS_KX_ANON_DH, GNUTLS_KX_SRP,
GNUTLS_KX_RSA_EXPORT, GNUTLS_KX_SRP_RSA, GNUTLS_KX_SRP_DSS
} gnutls_kx_algorithm_t;
enum gnutls_params_type_t
typedef enum { GNUTLS_PARAMS_RSA_EXPORT=1,
GNUTLS_PARAMS_DH
} gnutls_params_type_t;
enum gnutls_credentials_type_t
typedef enum { GNUTLS_CRD_CERTIFICATE=1, GNUTLS_CRD_ANON, GNUTLS_CRD_SRP } gnutls_credentials_type_t;
GNUTLS_MAC_SHA
#define GNUTLS_MAC_SHA GNUTLS_MAC_SHA1
GNUTLS_DIG_SHA
#define GNUTLS_DIG_SHA GNUTLS_DIG_SHA1
enum gnutls_mac_algorithm_t
typedef enum {
GNUTLS_MAC_UNKNOWN = 0,
GNUTLS_MAC_NULL = 1,
GNUTLS_MAC_MD5,
GNUTLS_MAC_SHA1,
GNUTLS_MAC_RMD160
} gnutls_mac_algorithm_t;
enum gnutls_digest_algorithm_t
typedef enum { GNUTLS_DIG_NULL=1, GNUTLS_DIG_MD5,
GNUTLS_DIG_SHA1, GNUTLS_DIG_RMD160
} gnutls_digest_algorithm_t;
GNUTLS_MAX_ALGORITHM_NUM
#define GNUTLS_MAX_ALGORITHM_NUM 16
GNUTLS_COMP_ZLIB
#define GNUTLS_COMP_ZLIB GNUTLS_COMP_DEFLATE
enum gnutls_compression_method_t
typedef enum { GNUTLS_COMP_NULL=1,
GNUTLS_COMP_DEFLATE,
GNUTLS_COMP_LZO /* only available if gnutls-extra has been initialized
*/
} gnutls_compression_method_t;
enum gnutls_connection_end_t
typedef enum { GNUTLS_SERVER=1, GNUTLS_CLIENT } gnutls_connection_end_t;
enum gnutls_alert_level_t
typedef enum { GNUTLS_AL_WARNING=1, GNUTLS_AL_FATAL } gnutls_alert_level_t;
enum gnutls_alert_description_t
typedef enum { GNUTLS_A_CLOSE_NOTIFY,
GNUTLS_A_UNEXPECTED_MESSAGE=10, GNUTLS_A_BAD_RECORD_MAC=20,
GNUTLS_A_DECRYPTION_FAILED, GNUTLS_A_RECORD_OVERFLOW, GNUTLS_A_DECOMPRESSION_FAILURE=30,
GNUTLS_A_HANDSHAKE_FAILURE=40, GNUTLS_A_SSL3_NO_CERTIFICATE=41,
GNUTLS_A_BAD_CERTIFICATE=42, GNUTLS_A_UNSUPPORTED_CERTIFICATE,
GNUTLS_A_CERTIFICATE_REVOKED, GNUTLS_A_CERTIFICATE_EXPIRED, GNUTLS_A_CERTIFICATE_UNKNOWN,
GNUTLS_A_ILLEGAL_PARAMETER, GNUTLS_A_UNKNOWN_CA, GNUTLS_A_ACCESS_DENIED, GNUTLS_A_DECODE_ERROR=50,
GNUTLS_A_DECRYPT_ERROR, GNUTLS_A_EXPORT_RESTRICTION=60, GNUTLS_A_PROTOCOL_VERSION=70,
GNUTLS_A_INSUFFICIENT_SECURITY, GNUTLS_A_INTERNAL_ERROR=80, GNUTLS_A_USER_CANCELED=90,
GNUTLS_A_NO_RENEGOTIATION=100, GNUTLS_A_UNSUPPORTED_EXTENSION=110,
GNUTLS_A_CERTIFICATE_UNOBTAINABLE=111, GNUTLS_A_UNRECOGNIZED_NAME=112,
GNUTLS_A_UNKNOWN_SRP_USERNAME=120, GNUTLS_A_MISSING_SRP_USERNAME=121
} gnutls_alert_description_t;
enum gnutls_handshake_description_t
typedef enum { GNUTLS_HANDSHAKE_HELLO_REQUEST,
GNUTLS_HANDSHAKE_CLIENT_HELLO, GNUTLS_HANDSHAKE_SERVER_HELLO,
GNUTLS_HANDSHAKE_CERTIFICATE_PKT=11, GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE,
GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST, GNUTLS_HANDSHAKE_SERVER_HELLO_DONE,
GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY, GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE,
GNUTLS_HANDSHAKE_FINISHED=20
} gnutls_handshake_description_t;
enum gnutls_certificate_status_t
typedef enum {
GNUTLS_CERT_INVALID=2, /* will be set if the certificate
* was not verified.
*/
GNUTLS_CERT_REVOKED=32, /* in X.509 this will be set only if CRLs are checked
*/
/* Those are extra information about the verification
* process. Will be set only if the certificate was
* not verified.
*/
GNUTLS_CERT_SIGNER_NOT_FOUND=64,
GNUTLS_CERT_SIGNER_NOT_CA=128
} gnutls_certificate_status_t;
enum gnutls_certificate_request_t
typedef enum { GNUTLS_CERT_IGNORE, GNUTLS_CERT_REQUEST=1, GNUTLS_CERT_REQUIRE } gnutls_certificate_request_t;
enum gnutls_openpgp_key_status_t
typedef enum { GNUTLS_OPENPGP_KEY,
GNUTLS_OPENPGP_KEY_FINGERPRINT
} gnutls_openpgp_key_status_t;
enum gnutls_close_request_t
typedef enum { GNUTLS_SHUT_RDWR=0, GNUTLS_SHUT_WR=1 } gnutls_close_request_t;
GNUTLS_TLS1
#define GNUTLS_TLS1 GNUTLS_TLS1_0
enum gnutls_protocol_t
typedef enum  {
GNUTLS_SSL3 = 1,
GNUTLS_TLS1_0,
GNUTLS_TLS1_1,
GNUTLS_VERSION_UNKNOWN = 0xff
} gnutls_protocol_t;
enum gnutls_certificate_type_t
typedef enum { GNUTLS_CRT_X509=1, GNUTLS_CRT_OPENPGP
} gnutls_certificate_type_t;
enum gnutls_x509_crt_fmt_t
typedef enum { GNUTLS_X509_FMT_DER,
GNUTLS_X509_FMT_PEM } gnutls_x509_crt_fmt_t;
enum gnutls_pk_algorithm_t
typedef enum { GNUTLS_PK_UNKNOWN=0, GNUTLS_PK_RSA = 1, GNUTLS_PK_DSA
} gnutls_pk_algorithm_t;
gnutls_pk_algorithm_get_name ()
const char* gnutls_pk_algorithm_get_name    (
gnutls-gnutls.html#gnutls-pk-algorithm-t
gnutls_pk_algorithm_t
algorithm);
algorithm
:
is a pk algorithm
Returns
:
a string that contains the name
of the specified public key algorithm or NULL.
GNUTLS_SIGN_RSA_SHA
#define GNUTLS_SIGN_RSA_SHA GNUTLS_SIGN_RSA_SHA1
GNUTLS_SIGN_DSA_SHA
#define GNUTLS_SIGN_DSA_SHA GNUTLS_SIGN_DSA_SHA1
enum gnutls_sign_algorithm_t
typedef enum { GNUTLS_SIGN_UNKNOWN=0, GNUTLS_SIGN_RSA_SHA1 = 1, GNUTLS_SIGN_DSA_SHA1,
GNUTLS_SIGN_RSA_MD5, GNUTLS_SIGN_RSA_MD2, GNUTLS_SIGN_RSA_RMD160
} gnutls_sign_algorithm_t;
gnutls_sign_algorithm_get_name ()
const char* gnutls_sign_algorithm_get_name  (
gnutls-gnutls.html#gnutls-sign-algorithm-t
gnutls_sign_algorithm_t
algorithm);
algorithm
:
is a sign algorithm
Returns
:
a string that contains the name
of the specified sign algorithm or NULL.
gnutls_transport_ptr_t
typedef void * gnutls_transport_ptr_t;
struct gnutls_session_int
struct gnutls_session_int;
gnutls_session_t
typedef struct gnutls_session_int* gnutls_session_t;
struct gnutls_dh_params_int
struct gnutls_dh_params_int;
gnutls_dh_params_t
typedef struct gnutls_dh_params_int* gnutls_dh_params_t;
gnutls_x509_privkey_int
typedef struct {
mpi_t params[MAX_PRIV_PARAMS_SIZE];	/* the size of params depends on the public
* key algorithm
*/
/*
* RSA: [0] is modulus
*      [1] is public exponent
*      [2] is private exponent
*      [3] is prime1 (p)
*      [4] is prime2 (q)
*      [5] is coefficient (u == inverse of p mod q)
*          note that other packages used inverse of q mod p,
*          so we need to perform conversions.
* DSA: [0] is p
*      [1] is q
*      [2] is g
*      [3] is y (public key)
*      [4] is x (private key)
*/
int params_size;		/* holds the number of params */
gnutls_pk_algorithm_t pk_algorithm;
int crippled;		/* The crippled keys will not use the ASN1_TYPE key.
* The encoding will only be performed at the export
* phase, to optimize copying etc. Cannot be used with
* the exported API (used internally only).
*/
ASN1_TYPE key;
} gnutls_x509_privkey_int;
gnutls_rsa_params_t
typedef struct gnutls_x509_privkey_int* gnutls_rsa_params_t; /* XXX ugly. */
gnutls_datum_t
typedef struct {
unsigned char * data;
unsigned int size;
} gnutls_datum_t;
gnutls_init ()
int         gnutls_init                     (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
*session,
gnutls-gnutls.html#gnutls-connection-end-t
gnutls_connection_end_t
con_end);
This function initializes the current session to null. Every session
must be initialized before use, so internal structures can be allocated.
This function allocates structures which can only be free'd
by calling
gnutls-gnutls.html#gnutls-deinit
gnutls_deinit()
. Returns zero on success.
session
:
is a pointer to a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
con_end
:
is used to indicate if this session is to be used for server or
client. Can be one of GNUTLS_CLIENT and GNUTLS_SERVER.
Returns
:
gnutls_deinit ()
../shishi/shishi-shishi.html#void
void
gnutls_deinit                   (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function clears all buffers associated with the
session
.
This function will also remove session data from the session database
if the session was terminated abnormally.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
gnutls_bye ()
int         gnutls_bye                      (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-close-request-t
gnutls_close_request_t
how);
Terminates the current TLS/SSL connection. The connection should
have been initiated using
gnutls-gnutls.html#gnutls-handshake
gnutls_handshake()
.
how
should be one of GNUTLS_SHUT_RDWR, GNUTLS_SHUT_WR.
In case of GNUTLS_SHUT_RDWR then the TLS connection gets terminated and
further receives and sends will be disallowed. If the return
value is zero you may continue using the connection.
GNUTLS_SHUT_RDWR actually sends an alert containing a close request
and waits for the peer to reply with the same message.
In case of GNUTLS_SHUT_WR then the TLS connection gets terminated and
further sends will be disallowed. In order to reuse the connection
you should wait for an EOF from the peer.
GNUTLS_SHUT_WR sends an alert containing a close request.
This function may also return GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED; cf.
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
how
:
is an integer
Returns
:
gnutls_handshake ()
int         gnutls_handshake                (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function does the handshake of the TLS/SSL protocol,
and initializes the TLS connection.
This function will fail if any problem is encountered,
and will return a negative error code. In case of a client,
if the client has asked to resume a session, but the server couldn't,
then a full handshake will be performed.
The non-fatal errors such as GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED
interrupt the handshake procedure, which should be later be resumed.
Call this function again, until it returns 0; cf.
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction()
and
gnutls-gnutls.html#gnutls-error-is-fatal
gnutls_error_is_fatal()
.
If this function is called by a server after a rehandshake request then
GNUTLS_E_GOT_APPLICATION_DATA or GNUTLS_E_WARNING_ALERT_RECEIVED
may be returned. Note that these are non fatal errors, only in the
specific case of a rehandshake. Their meaning is that the client
rejected the rehandshake request.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_rehandshake ()
int         gnutls_rehandshake              (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will renegotiate security parameters with the
client. This should only be called in case of a server.
This message informs the peer that we want to renegotiate
parameters (perform a handshake).
If this function succeeds (returns 0), you must call
the
gnutls-gnutls.html#gnutls-handshake
gnutls_handshake()
function in order to negotiate
the new parameters.
If the client does not wish to renegotiate parameters he
will should with an alert message, thus the return code will be
GNUTLS_E_WARNING_ALERT_RECEIVED and the alert will be
GNUTLS_A_NO_RENEGOTIATION. A client may also choose to ignore
this message.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_alert_get ()
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
gnutls_alert_get (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the last alert number received. This function
should be called if GNUTLS_E_WARNING_ALERT_RECEIVED or
GNUTLS_E_FATAL_ALERT_RECEIVED has been returned by a gnutls function.
The peer may send alerts if he thinks some things were not
right. Check gnutls.h for the available alert descriptions.
If no alert has been received the returned value is undefined.
gnutls_alert_send ()
int         gnutls_alert_send               (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-alert-level-t
gnutls_alert_level_t
level,
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
desc);
This function will send an alert to the peer in order to inform
him of something important (eg. his Certificate could not be verified).
If the alert level is Fatal then the peer is expected to close the
connection, otherwise he may ignore the alert and continue.
The error code of the underlying record send function will be returned,
so you may also receive GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN as well.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
level
:
is the level of the alert
desc
:
is the alert description
Returns
:
0 on success.
gnutls_alert_send_appropriate ()
int         gnutls_alert_send_appropriate   (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int err);
Sends an alert to the peer depending on the error code returned by a gnutls
function. This function will call
gnutls-gnutls.html#gnutls-error-to-alert
gnutls_error_to_alert()
to determine
the appropriate alert to send.
This function may also return GNUTLS_E_AGAIN, or GNUTLS_E_INTERRUPTED.
If the return value is GNUTLS_E_INVALID_REQUEST, then no alert has
been sent to the peer.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
err
:
is an integer
Returns
:
zero on success.
gnutls_alert_get_name ()
const char* gnutls_alert_get_name           (
gnutls-gnutls.html#gnutls-alert-description-t
gnutls_alert_description_t
alert);
alert
:
is an alert number
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
a string that describes the given alert number or NULL.
See
gnutls-gnutls.html#gnutls-alert-get
gnutls_alert_get()
.
gnutls_cipher_get ()
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
gnutls_cipher_get (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the currently used cipher.
gnutls_kx_get ()
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
gnutls_kx_get         (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the key exchange algorithm used in the last handshake.
gnutls_mac_get ()
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
gnutls_mac_get       (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the currently used mac algorithm.
gnutls_compression_get ()
gnutls-gnutls.html#gnutls-compression-method-t
gnutls_compression_method_t
gnutls_compression_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the currently used compression method.
gnutls_certificate_type_get ()
gnutls-gnutls.html#gnutls-certificate-type-t
gnutls_certificate_type_t
gnutls_certificate_type_get
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the currently used certificate type. The certificate type
is by default X.509, unless it is negotiated as a TLS extension.
gnutls_cipher_get_key_size ()
size_t      gnutls_cipher_get_key_size      (
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
algorithm);
Returns the length (in bytes) of the given cipher's key size.
algorithm
:
is an encryption algorithm
Returns
:
0 if the given cipher is invalid.
gnutls_cipher_get_name ()
const char* gnutls_cipher_get_name          (
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
algorithm);
algorithm
:
is an encryption algorithm
Returns
:
a pointer to a string that contains the name
of the specified cipher or NULL.
gnutls_mac_get_name ()
const char* gnutls_mac_get_name             (
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
algorithm);
algorithm
:
is a MAC algorithm
Returns
:
a string that contains the name
of the specified MAC algorithm or NULL.
gnutls_compression_get_name ()
const char* gnutls_compression_get_name     (
gnutls-gnutls.html#gnutls-compression-method-t
gnutls_compression_method_t
algorithm);
algorithm
:
is a Compression algorithm
Returns
:
a pointer to a string that contains the name
of the specified compression algorithm or NULL.
gnutls_kx_get_name ()
const char* gnutls_kx_get_name              (
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
algorithm);
algorithm
:
is a key exchange algorithm
Returns
:
a pointer to a string that contains the name
of the specified key exchange algorithm or NULL.
gnutls_certificate_type_get_name ()
const char* gnutls_certificate_type_get_name
(
gnutls-gnutls.html#gnutls-certificate-type-t
gnutls_certificate_type_t
type);
type
:
is a certificate type
Returns
:
a string (or NULL) that contains the name
of the specified certificate type.
gnutls_error_is_fatal ()
int         gnutls_error_is_fatal           (int error);
If a function returns a negative value you may feed that value
to this function to see if it is fatal. Returns 1 for a fatal
error 0 otherwise. However you may want to check the
error code manually, since some non-fatal errors to the protocol
may be fatal for you (your program).
This is only useful if you are dealing with errors from the
record layer or the handshake layer.
error
:
is an error returned by a gnutls function. Error should be a negative value.
Returns
:
gnutls_error_to_alert ()
int         gnutls_error_to_alert           (int err,
int *level);
err
:
is a negative integer
level
:
the alert level will be stored there
Returns
:
an alert depending on the error code returned by a gnutls
function. All alerts sent by this function should be considered fatal.
The only exception is when err == GNUTLS_E_REHANDSHAKE, where a warning
alert should be sent to the peer indicating that no renegotiation will
be performed.
If the return value is GNUTLS_E_INVALID_REQUEST, then there was no
mapping to an alert.
gnutls_perror ()
../shishi/shishi-shishi.html#void
void
gnutls_perror                   (int error);
This function is like
perror()
. The only difference is that it accepts an
error number returned by a gnutls function.
error
:
is an error returned by a gnutls function. Error is always a negative value.
gnutls_strerror ()
const char* gnutls_strerror                 (int error);
This function is similar to
strerror()
. Differences: it accepts an error
number returned by a gnutls function; In case of an unknown error
a descriptive string is sent instead of NULL.
error
:
is an error returned by a gnutls function. Error is always a negative value.
Returns
:
gnutls_handshake_set_private_extensions ()
../shishi/shishi-shishi.html#void
void
gnutls_handshake_set_private_extensions
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int allow);
This function will enable or disable the use of private
cipher suites (the ones that start with 0xFF). By default
or if
allow
is 0 then these cipher suites will not be
advertized nor used.
Unless this function is called with the option to allow (1), then
no compression algorithms, like LZO. That is because these algorithms
are not yet defined in any RFC or even internet draft.
Enabling the private ciphersuites when talking to other than gnutls
servers and clients may cause interoperability problems.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
allow
:
is an integer (0 or 1)
gnutls_handshake_get_last_out ()
gnutls-gnutls.html#gnutls-handshake-description-t
gnutls_handshake_description_t
gnutls_handshake_get_last_out
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the last handshake message sent. This function is only useful
to check where the last performed handshake failed. If the previous handshake
succeed or was not performed at all then no meaningful value will be returned.
Check gnutls.h for the available handshake descriptions.
gnutls_handshake_get_last_in ()
gnutls-gnutls.html#gnutls-handshake-description-t
gnutls_handshake_description_t
gnutls_handshake_get_last_in
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the last handshake message received. This function is only useful
to check where the last performed handshake failed. If the previous handshake
succeed or was not performed at all then no meaningful value will be returned.
Check gnutls.h for the available handshake descriptions.
gnutls_record_send ()
ssize_t     gnutls_record_send              (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const
../shishi/shishi-shishi.html#void
void
*data,
size_t sizeofdata);
This function has the similar semantics with
send()
. The only
difference is that is accepts a GNUTLS session, and uses different
error codes.
If the EINTR is returned by the internal push function (the
default is
send()
} then
GNUTLS_E_INTERRUPTED
will be returned. If
GNUTLS_E_INTERRUPTED
or
GNUTLS_E_AGAIN
is returned, you must
call this function again, with the same parameters; alternatively
you could provide a
NULL
pointer for data, and 0 for
size. cf.
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
data
:
contains the data to send
sizeofdata
:
is the length of the data
Returns
:
the number of bytes sent, or a negative error code. The
number of bytes sent might be less than
sizeofdata
. The maximum
number of bytes this function can send in a single call depends on
the negotiated maximum record size.
gnutls_record_recv ()
ssize_t     gnutls_record_recv              (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*data,
size_t sizeofdata);
This function has the similar semantics with
recv()
. The only
difference is that is accepts a GNUTLS session, and uses different
error codes.
In the special case that a server requests a renegotiation, the
client may receive an error code of GNUTLS_E_REHANDSHAKE.  This
message may be simply ignored, replied with an alert containing
NO_RENEGOTIATION, or replied with a new handshake, depending on
the client's will.
If EINTR is returned by the internal push function (the default is
code
{
recv()
}) then GNUTLS_E_INTERRUPTED will be returned. If
GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN is returned, you must call
this function again, with the same parameters; alternatively you
could provide a NULL pointer for data, and 0 for
size. cf.
code
{
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction()
}.
A server may also receive GNUTLS_E_REHANDSHAKE when a client has
initiated a handshake. In that case the server can only initiate a
handshake or terminate the connection.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
data
:
the buffer that the data will be read into
sizeofdata
:
the number of requested bytes
Returns
:
the number of bytes received and zero on EOF.  A negative
error code is returned in case of an error.  The number of bytes
received might be less than
code
{count}.
gnutls_read
#define gnutls_read gnutls_record_recv
gnutls_write
#define gnutls_write gnutls_record_send
gnutls_record_get_direction ()
int         gnutls_record_get_direction     (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function provides information about the internals of the record
protocol and is only useful if a prior gnutls function call (e.g.
gnutls-gnutls.html#gnutls-handshake
gnutls_handshake()
) was interrupted for some reason, that is, if a function
returned GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN. In such a case, you might
want to call
select()
or
poll()
before calling the interrupted gnutls
function again. To tell you whether a file descriptor should be selected
for either reading or writing,
gnutls-gnutls.html#gnutls-record-get-direction
gnutls_record_get_direction()
returns 0 if
the interrupted function was trying to read data, and 1 if it was trying to
write data.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_record_get_max_size ()
size_t      gnutls_record_get_max_size      (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function returns the maximum record packet size in this connection.
The maximum record size is negotiated by the client after the
first handshake message.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_record_set_max_size ()
ssize_t     gnutls_record_set_max_size      (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
size_t size);
This function sets the maximum record packet size in this connection.
This property can only be set to clients. The server may
choose not to accept the requested size.
Acceptable values are 512(=2^9), 1024(=2^10), 2048(=2^11) and 4096(=2^12).
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
size
:
is the new size
Returns
:
0 on success. The requested record size does
get in effect immediately only while sending data. The receive
part will take effect after a successful handshake.
This function uses a TLS extension called 'max record size'.
Not all TLS implementations use or even understand this extension.
gnutls_record_check_pending ()
size_t      gnutls_record_check_pending     (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function checks if there are any data to receive
in the gnutls buffers. Returns the size of that data or 0.
Notice that you may also use
select()
to check for data in
a TCP connection, instead of this function.
(gnutls leaves some data in the tcp buffer in order for select
to work).
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
enum gnutls_server_name_type_t
typedef enum { GNUTLS_NAME_DNS=1
} gnutls_server_name_type_t;
gnutls_server_name_set ()
int         gnutls_server_name_set          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-server-name-type-t
gnutls_server_name_type_t
type,
const
../shishi/shishi-shishi.html#void
void
*name,
size_t name_length);
This function is to be used by clients that want to inform
(via a TLS extension mechanism) the server of the name they
connected to. This should be used by clients that connect
to servers that do virtual hosting.
The value of
name
depends on the
ind
type. In case of GNUTLS_NAME_DNS,
an ASCII or UTF-8 null terminated string, without the trailing dot, is expected.
IPv4 or IPv6 addresses are not permitted.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
type
:
specifies the indicator type
name
:
is a string that contains the server name.
name_length
:
holds the length of name
Returns
:
gnutls_server_name_get ()
int         gnutls_server_name_get          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*data,
size_t *data_length,
unsigned int *type,
unsigned int indx);
This function will allow you to get the name indication (if any),
a client has sent. The name indication may be any of the enumeration
gnutls_server_name_type_t.
If
type
is GNUTLS_NAME_DNS, then this function is to be used by servers
that support virtual hosting, and the data will be a null terminated UTF-8 string.
If
data
has not enough size to hold the server name GNUTLS_E_SHORT_MEMORY_BUFFER
is returned, and
data_length
will hold the required size.
index
is used to retrieve more than one server names (if sent by the client).
The first server name has an index of 0, the second 1 and so on. If no name with the given
index exists GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
data
:
will hold the data
data_length
:
will hold the data length. Must hold the maximum size of data.
type
:
will hold the server name indicator type
indx
:
is the index of the server_name
Returns
:
gnutls_cipher_set_priority ()
int         gnutls_cipher_set_priority      (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the ciphers supported by gnutls.
Priority is higher for ciphers specified before others.
After specifying the ciphers you want, you must append a 0.
Note that the priority is set on the client. The server does
not use the algorithm's priority except for disabling
algorithms that were not specified.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_cipher_algorithm_t elements.
Returns
:
gnutls_mac_set_priority ()
int         gnutls_mac_set_priority         (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the mac algorithms supported by gnutls.
Priority is higher for algorithms specified before others.
After specifying the algorithms you want, you must append a 0.
Note that the priority is set on the client. The server does
not use the algorithm's priority except for disabling
algorithms that were not specified.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_mac_algorithm_t elements.
Returns
:
gnutls_compression_set_priority ()
int         gnutls_compression_set_priority (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the compression algorithms supported by gnutls.
Priority is higher for algorithms specified before others.
After specifying the algorithms you want, you must append a 0.
Note that the priority is set on the client. The server does
not use the algorithm's priority except for disabling
algorithms that were not specified.
TLS 1.0 does not define any compression algorithms except
NULL. Other compression algorithms are to be considered
as gnutls extensions.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_compression_method_t elements.
Returns
:
gnutls_kx_set_priority ()
int         gnutls_kx_set_priority          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the key exchange algorithms supported by gnutls.
Priority is higher for algorithms specified before others.
After specifying the algorithms you want, you must append a 0.
Note that the priority is set on the client. The server does
not use the algorithm's priority except for disabling
algorithms that were not specified.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_kx_algorithm_t elements.
Returns
:
gnutls_protocol_set_priority ()
int         gnutls_protocol_set_priority    (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the protocol versions supported by gnutls.
This function actually enables or disables protocols. Newer protocol
versions always have highest priority.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_protocol_t elements.
Returns
:
gnutls_certificate_type_set_priority ()
int         gnutls_certificate_type_set_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const int *list);
Sets the priority on the certificate types supported by gnutls.
Priority is higher for types specified before others.
After specifying the types you want, you must append a 0.
Note that the certificate type priority is set on the client.
The server does not use the cert type priority except for disabling
types that were not specified.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
list
:
is a 0 terminated list of gnutls_certificate_type_t elements.
Returns
:
gnutls_set_default_priority ()
int         gnutls_set_default_priority     (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
Sets some default priority on the ciphers, key exchange methods, macs
and compression methods. This is to avoid using the gnutls_*
_priority()
functions, if
these defaults are ok. You may override any of the following priorities by calling
the appropriate functions.
The order is TLS1, SSL3 for protocols.
RSA, DHE_DSS, DHE_RSA for key exchange
algorithms. SHA, MD5 and RIPEMD160 for MAC algorithms.
AES_256_CBC, AES_128_CBC, 3DES_CBC,
and ARCFOUR_128 for ciphers.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_set_default_export_priority ()
int         gnutls_set_default_export_priority
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
Sets some default priority on the ciphers, key exchange methods, macs
and compression methods. This is to avoid using the gnutls_*
_priority()
functions, if
these defaults are ok. This function also includes weak algorithms.
The order is TLS1, SSL3 for protocols,  RSA, DHE_DSS,
DHE_RSA, RSA_EXPORT for key exchange algorithms.
SHA, MD5, RIPEMD160 for MAC algorithms,
AES_256_CBC, AES_128_CBC,
and 3DES_CBC, ARCFOUR_128, ARCFOUR_40 for ciphers.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_cipher_suite_get_name ()
const char* gnutls_cipher_suite_get_name    (
gnutls-gnutls.html#gnutls-kx-algorithm-t
gnutls_kx_algorithm_t
kx_algorithm,
gnutls-gnutls.html#gnutls-cipher-algorithm-t
gnutls_cipher_algorithm_t
cipher_algorithm,
gnutls-gnutls.html#gnutls-mac-algorithm-t
gnutls_mac_algorithm_t
mac_algorithm);
kx_algorithm
:
is a Key exchange algorithm
cipher_algorithm
:
is a cipher algorithm
mac_algorithm
:
is a MAC algorithm
Returns
:
a string that contains the name of a TLS
cipher suite, specified by the given algorithms, or NULL.
Note that the full cipher suite name must be prepended
by TLS or SSL depending of the protocol in use.
gnutls_protocol_get_version ()
gnutls-gnutls.html#gnutls-protocol-t
gnutls_protocol_t
gnutls_protocol_get_version
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the version of the currently used protocol.
gnutls_protocol_get_name ()
const char* gnutls_protocol_get_name        (
gnutls-gnutls.html#gnutls-protocol-t
gnutls_protocol_t
version);
version
:
is a (gnutls) version number
Returns
:
a string that contains the name
of the specified TLS version or NULL.
gnutls_session_set_data ()
int         gnutls_session_set_data         (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
const
../shishi/shishi-shishi.html#void
void
*session_data,
size_t session_data_size);
Sets all session parameters, in order to resume a previously established
session. The session data given must be the one returned by
gnutls-gnutls.html#gnutls-session-get-data
gnutls_session_get_data()
.
This function should be called before
gnutls-gnutls.html#gnutls-handshake
gnutls_handshake()
.
Keep in mind that session resuming is advisory. The server may
choose not to resume the session, thus a full handshake will be
performed.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
session_data
:
is a pointer to space to hold the session.
session_data_size
:
is the session's size
Returns
:
a negative value on error.
gnutls_session_get_data ()
int         gnutls_session_get_data         (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*session_data,
size_t *session_data_size);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
session_data
:
is a pointer to space to hold the session.
session_data_size
:
is the session_data's size, or it will be set by the function.
Returns
:
all session parameters, in order to support resuming.
The client should call this, and keep the returned session, if he wants to
resume that current version later by calling
gnutls-gnutls.html#gnutls-session-set-data
gnutls_session_set_data()
This function must be called after a successful handshake.
Resuming sessions is really useful and speedups connections after a succesful one.
GNUTLS_MAX_SESSION_ID
#define GNUTLS_MAX_SESSION_ID 32
gnutls_session_get_id ()
int         gnutls_session_get_id           (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*session_id,
size_t *session_id_size);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
session_id
:
is a pointer to space to hold the session id.
session_id_size
:
is the session id's size, or it will be set by the function.
Returns
:
the current session id. This can be used if you want to check if
the next session you tried to resume was actually resumed.
This is because resumed sessions have the same sessionID with the
original session.
Session id is some data set by the server, that identify the current session.
In TLS 1.0 and SSL 3.0 session id is always less than 32 bytes.
gnutls_session_is_resumed ()
int         gnutls_session_is_resumed       (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return non zero if this session is a resumed one,
or a zero if this is a new session.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_db_store_func ()
int         (*gnutls_db_store_func)         (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
data);
Param1
:
key
:
data
:
Returns
:
gnutls_db_remove_func ()
int         (*gnutls_db_remove_func)        (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key);
Param1
:
key
:
Returns
:
gnutls_db_retr_func ()
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
(*gnutls_db_retr_func)       (
../shishi/shishi-shishi.html#void
void
*,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
key);
Param1
:
key
:
Returns
:
gnutls_db_set_cache_expiration ()
../shishi/shishi-shishi.html#void
void
gnutls_db_set_cache_expiration  (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int seconds);
Sets the expiration time for resumed sessions. The default is 3600 (one hour)
at the time writing this.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
seconds
:
is the number of seconds.
gnutls_db_remove_session ()
../shishi/shishi-shishi.html#void
void
gnutls_db_remove_session        (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will remove the current session data from the session
database. This will prevent future handshakes reusing these session
data. This function should be called if a session was terminated
abnormally, and before
gnutls-gnutls.html#gnutls-deinit
gnutls_deinit()
is called.
Normally
gnutls-gnutls.html#gnutls-deinit
gnutls_deinit()
will remove abnormally terminated sessions.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
gnutls_db_set_retrieve_function ()
../shishi/shishi-shishi.html#void
void
gnutls_db_set_retrieve_function (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-retr-func
gnutls_db_retr_func
retr_func);
Sets the function that will be used to retrieve data from the resumed
sessions database. This function must return a gnutls_datum_t containing the
data on success, or a gnutls_datum_t containing null and 0 on failure.
The datum's data must be allocated using the function
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
.
The first argument to
store_function()
will be null unless
gnutls-gnutls.html#gnutls-db-set-ptr
gnutls_db_set_ptr()
has been called.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
retr_func
:
is the function.
gnutls_db_set_remove_function ()
../shishi/shishi-shishi.html#void
void
gnutls_db_set_remove_function   (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-remove-func
gnutls_db_remove_func
rem_func);
Sets the function that will be used to remove data from the resumed
sessions database. This function must return 0 on success.
The first argument to
rem_function()
will be null unless
gnutls-gnutls.html#gnutls-db-set-ptr
gnutls_db_set_ptr()
has been called.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
rem_func
:
is the function.
gnutls_db_set_store_function ()
../shishi/shishi-shishi.html#void
void
gnutls_db_set_store_function    (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-db-store-func
gnutls_db_store_func
store_func);
Sets the function that will be used to store data from the resumed
sessions database. This function must remove 0 on success.
The first argument to
store_function()
will be null unless
gnutls-gnutls.html#gnutls-db-set-ptr
gnutls_db_set_ptr()
has been called.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
store_func
:
is the function
gnutls_db_set_ptr ()
../shishi/shishi-shishi.html#void
void
gnutls_db_set_ptr               (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*ptr);
Sets the pointer that will be provided to db store, retrieve and delete functions, as
the first argument.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
ptr
:
is the pointer
gnutls_db_get_ptr ()
../shishi/shishi-shishi.html#void
void
*       gnutls_db_get_ptr               (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
the pointer that will be sent to db store, retrieve and delete functions, as
the first argument.
gnutls_db_check_entry ()
int         gnutls_db_check_entry           (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
session_entry);
This function returns GNUTLS_E_EXPIRED, if the database entry
has expired or 0 otherwise. This function is to be used when
you want to clear unnesessary session which occupy space in your
backend.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
session_entry
:
is the session data (not key)
Returns
:
gnutls_handshake_set_max_packet_length ()
../shishi/shishi-shishi.html#void
void
gnutls_handshake_set_max_packet_length
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int max);
This function will set the maximum size of a handshake message.
Handshake messages over this size are rejected.
The default value is 16kb which is large enough. Set this to 0 if you do not want
to set an upper limit.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
max
:
is the maximum number.
gnutls_check_version ()
const char* gnutls_check_version            (const char *req_version);
Check that the version of the library is at minimum the requested one
and return the version string; return NULL if the condition is not
satisfied.  If a NULL is passed to this function, no check is done,
but the version string is simply returned.
req_version
:
the version to check
Returns
:
gnutls_credentials_clear ()
../shishi/shishi-shishi.html#void
void
gnutls_credentials_clear        (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
Clears all the credentials previously set in this session.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
gnutls_credentials_set ()
int         gnutls_credentials_set          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
type,
../shishi/shishi-shishi.html#void
void
*cred);
Sets the needed credentials for the specified type.
Eg username, password - or public and private keys etc.
The (void* cred) parameter is a structure that depends on the
specified type and on the current session (client or server).
[ In order to minimize memory usage, and share credentials between
several threads gnutls keeps a pointer to cred, and not the whole cred
structure. Thus you will have to keep the structure allocated until
you call
gnutls-gnutls.html#gnutls-deinit
gnutls_deinit()
. ]
For GNUTLS_CRD_ANON cred should be gnutls_anon_client_credentials_t in case of a client.
In case of a server it should be gnutls_anon_server_credentials_t.
For GNUTLS_CRD_SRP cred should be gnutls_srp_client_credentials_t
in case of a client, and gnutls_srp_server_credentials_t, in case
of a server.
For GNUTLS_CRD_CERTIFICATE cred should be gnutls_certificate_credentials_t.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
type
:
is the type of the credentials
cred
:
is a pointer to a structure.
Returns
:
gnutls_cred_set
#define gnutls_cred_set	gnutls_credentials_set
struct gnutls_certificate_credentials_st
struct gnutls_certificate_credentials_st;
gnutls_certificate_credentials_t
typedef struct gnutls_certificate_credentials_st *gnutls_certificate_credentials_t;
gnutls_certificate_server_credentials
typedef gnutls_certificate_credentials_t gnutls_certificate_server_credentials;
gnutls_certificate_client_credentials
typedef gnutls_certificate_credentials_t gnutls_certificate_client_credentials;
gnutls_anon_server_credentials_t
typedef struct gnutls_anon_server_credentials_st* gnutls_anon_server_credentials_t;
gnutls_anon_client_credentials_t
typedef struct gnutls_anon_client_credentials_st* gnutls_anon_client_credentials_t;
gnutls_anon_free_server_credentials ()
../shishi/shishi-shishi.html#void
void
gnutls_anon_free_server_credentials
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to free (deallocate) it.
sc
:
is an
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
structure.
gnutls_anon_allocate_server_credentials ()
int         gnutls_anon_allocate_server_credentials
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
*sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to allocate it.
sc
:
is a pointer to an
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
structure.
Returns
:
gnutls_anon_set_server_dh_params ()
../shishi/shishi-shishi.html#void
void
gnutls_anon_set_server_dh_params
(
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
res,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
This function will set the diffie hellman parameters for an anonymous
server to use. These parameters will be used in Anonymous Diffie Hellman
cipher suites.
res
:
is a gnutls_anon_server_credentials_t structure
dh_params
:
is a structure that holds diffie hellman parameters.
gnutls_anon_free_client_credentials ()
../shishi/shishi-shishi.html#void
void
gnutls_anon_free_client_credentials
(
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to free (deallocate) it.
sc
:
is an
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
structure.
gnutls_anon_allocate_client_credentials ()
int         gnutls_anon_allocate_client_credentials
(
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
*sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to allocate it.
sc
:
is a pointer to an
gnutls-gnutls.html#gnutls-anon-client-credentials-t
gnutls_anon_client_credentials_t
structure.
Returns
:
gnutls_certificate_free_credentials ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_free_credentials
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to free (deallocate) it.
This function does not free any temporary parameters associated
with this structure (ie RSA and DH parameters are not freed by
this function).
sc
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
gnutls_certificate_allocate_credentials ()
int         gnutls_certificate_allocate_credentials
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
*res);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to allocate it.
res
:
is a pointer to an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
Returns
:
0 on success.
gnutls_certificate_free_keys ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_free_keys    (
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
This function will delete all the keys and the certificates associated
with the given credentials. This function must not be called when a
TLS negotiation that uses the credentials is in progress.
sc
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
gnutls_certificate_free_cas ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_free_cas     (
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
This function will delete all the CAs associated
with the given credentials. Servers that do not use
gnutls-gnutls.html#gnutls-certificate-verify-peers2
gnutls_certificate_verify_peers2()
may call this to
save some memory.
sc
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
gnutls_certificate_free_ca_names ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_free_ca_names
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
This function will delete all the CA name in the
given credentials. Clients may call this to save some memory
since in client side the CA names are not used.
CA names are used by servers to advertize the CAs they
support to clients.
sc
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
gnutls_certificate_free_crls ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_free_crls    (
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
sc);
This function will delete all the CRLs associated
with the given credentials.
sc
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
gnutls_certificate_set_dh_params ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_set_dh_params
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
This function will set the diffie hellman parameters for a
certificate server to use. These parameters will be used in
Ephemeral Diffie Hellman cipher suites.  Note that only a pointer
to the parameters are stored in the certificate handle, so if you
deallocate the parameters before the certificate is deallocated,
you must change the parameters stored in the certificate first.
res
:
is a gnutls_certificate_credentials_t structure
dh_params
:
is a structure that holds diffie hellman parameters.
gnutls_certificate_set_rsa_export_params ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_set_rsa_export_params
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params);
This function will set the temporary RSA parameters for a certificate
server to use. These parameters will be used in RSA-EXPORT
cipher suites.
res
:
is a gnutls_certificate_credentials_t structure
rsa_params
:
is a structure that holds temporary RSA parameters.
gnutls_certificate_set_verify_flags ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_set_verify_flags
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
unsigned int flags);
This function will set the flags to be used at verification of the certificates.
Flags must be OR of the gnutls_certificate_verify_flags enumerations.
res
:
is a gnutls_certificate_credentials_t structure
flags
:
are the flagsis a structure that holds diffie hellman parameters.
gnutls_certificate_set_verify_limits ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_set_verify_limits
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
unsigned int max_bits,
unsigned int max_depth);
This function will set some upper limits for the default verification function,
gnutls-gnutls.html#gnutls-certificate-verify-peers2
gnutls_certificate_verify_peers2()
, to avoid denial of service attacks.
res
:
is a gnutls_certificate_credentials structure
max_bits
:
is the number of bits of an acceptable certificate (default 8200)
max_depth
:
is maximum depth of the verification of a certificate chain (default 5)
gnutls_certificate_set_x509_trust_file ()
int         gnutls_certificate_set_x509_trust_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *CAFILE,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function adds the trusted CAs in order to verify client
or server certificates. In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers()
.
This function may be called multiple times.
In case of a server the CAs set here will be sent to the client
if a certificate request is sent. This can be disabled using
gnutls_certificate_send_x509_rdn_sequence()
.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
CAFILE
:
is a file containing the list of trusted CAs (DER or PEM list)
type
:
is PEM or DER
Returns
:
the number of certificates processed or a negative
value on error.
gnutls_certificate_set_x509_trust_mem ()
int         gnutls_certificate_set_x509_trust_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CA,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function adds the trusted CAs in order to verify client
or server certificates. In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers()
.
This function may be called multiple times.
In case of a server the CAs set here will be sent to the client
if a certificate request is sent. This can be disabled using
gnutls_certificate_send_x509_rdn_sequence()
.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
CA
:
is a list of trusted CAs or a DER certificate
type
:
is DER or PEM
Returns
:
the number of certificates processed or a negative
value on error.
gnutls_certificate_set_x509_crl_file ()
int         gnutls_certificate_set_x509_crl_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *crlfile,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function adds the trusted CRLs in order to verify client or server
certificates.  In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers2
gnutls_certificate_verify_peers2()
.
This function may be called multiple times.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
crlfile
:
is a file containing the list of verified CRLs (DER or PEM list)
type
:
is PEM or DER
Returns
:
the number of CRLs processed or a negative value
on error.
gnutls_certificate_set_x509_crl_mem ()
int         gnutls_certificate_set_x509_crl_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CRL,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function adds the trusted CRLs in order to verify client or server
certificates.  In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers()
.
This function may be called multiple times.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
CRL
:
is a list of trusted CRLs. They should have been verified before.
type
:
is DER or PEM
Returns
:
the number of CRLs processed or a negative value
on error.
gnutls_certificate_set_x509_key_file ()
int         gnutls_certificate_set_x509_key_file
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const char *CERTFILE,
const char *KEYFILE,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function sets a certificate/private key pair in the
gnutls_certificate_credentials_t structure. This function may be called
more than once (in case multiple keys/certificates exist for the
server).
Currently only PKCS-1 encoded RSA and DSA private keys are accepted by
this function.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
CERTFILE
:
is a file that containing the certificate list (path) for
the specified private key, in PKCS7 format, or a list of certificates
KEYFILE
:
is a file that contains the private key
type
:
is PEM or DER
Returns
:
gnutls_certificate_set_x509_key_mem ()
int         gnutls_certificate_set_x509_key_mem
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*CERT,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*KEY,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
type);
This function sets a certificate/private key pair in the
gnutls_certificate_credentials_t structure. This function may be called
more than once (in case multiple keys/certificates exist for the
server).
Currently are supported: RSA PKCS-1 encoded private keys,
DSA private keys.
DSA private keys are encoded the OpenSSL way, which is an ASN.1
DER sequence of 6 INTEGERs - version, p, q, g, pub, priv.
Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates
is supported. This means that certificates intended for signing cannot
be used for ciphersuites that require encryption.
If the certificate and the private key are given in PEM encoding
then the strings that hold their values must be null terminated.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
CERT
:
contains a certificate list (path) for the specified private key
KEY
:
is the private key
type
:
is PEM or DER
Returns
:
gnutls_x509_privkey_t
typedef struct gnutls_x509_privkey_int* gnutls_x509_privkey_t;
gnutls_x509_crl_int
typedef struct {
ASN1_TYPE crl;
} gnutls_x509_crl_int;
gnutls_x509_crl_t
typedef struct gnutls_x509_crl_int* gnutls_x509_crl_t;
gnutls_x509_crt_int
typedef struct {
ASN1_TYPE cert;
int use_extensions;
} gnutls_x509_crt_int;
gnutls_x509_crt_t
typedef struct gnutls_x509_crt_int* gnutls_x509_crt_t;
gnutls_certificate_set_x509_key ()
int         gnutls_certificate_set_x509_key (
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crt-t
gnutls_x509_crt_t
*cert_list,
int cert_list_size,
gnutls-gnutls.html#gnutls-x509-privkey-t
gnutls_x509_privkey_t
key);
This function sets a certificate/private key pair in the
gnutls_certificate_credentials_t structure. This function may be called
more than once (in case multiple keys/certificates exist for the
server).
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
cert_list
:
contains a certificate list (path) for the specified private key
cert_list_size
:
holds the size of the certificate list
key
:
is a gnutls_x509_privkey_t key
Returns
:
gnutls_certificate_set_x509_trust ()
int         gnutls_certificate_set_x509_trust
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crt-t
gnutls_x509_crt_t
*ca_list,
int ca_list_size);
This function adds the trusted CAs in order to verify client
or server certificates. In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers()
.
This function may be called multiple times.
In case of a server the CAs set here will be sent to the client
if a certificate request is sent. This can be disabled using
gnutls_certificate_send_x509_rdn_sequence()
.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
ca_list
:
is a list of trusted CAs
ca_list_size
:
holds the size of the CA list
Returns
:
0 on success.
gnutls_certificate_set_x509_crl ()
int         gnutls_certificate_set_x509_crl (
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
res,
gnutls-gnutls.html#gnutls-x509-crl-t
gnutls_x509_crl_t
*crl_list,
int crl_list_size);
This function adds the trusted CRLs in order to verify client or server
certificates.  In case of a client this is not required
to be called if the certificates are not verified using
gnutls-gnutls.html#gnutls-certificate-verify-peers
gnutls_certificate_verify_peers()
.
This function may be called multiple times.
res
:
is an
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
crl_list
:
is a list of trusted CRLs. They should have been verified before.
crl_list_size
:
holds the size of the crl_list
Returns
:
0 on success.
gnutls_global_init ()
int         gnutls_global_init              (void);
This function initializes the global data to defaults.
Every gnutls application has a global data which holds common parameters
shared by gnutls session structures.
You must call
gnutls-gnutls.html#gnutls-global-deinit
gnutls_global_deinit()
when gnutls usage is no longer needed
Returns
:
zero on success.
Note that this function will also initialize libgcrypt, if it has not
been initialized before. Thus if you want to manually initialize libgcrypt
you must do it before calling this function. This is useful in cases you
want to disable libgcrypt's internal lockings etc.
gnutls_global_deinit ()
../shishi/shishi-shishi.html#void
void
gnutls_global_deinit            (void);
This function deinitializes the global data, that were initialized
using
gnutls-gnutls.html#gnutls-global-init
gnutls_global_init()
.
gnutls_alloc_function ()
../shishi/shishi-shishi.html#void
void
*       (*gnutls_alloc_function)        (size_t);
Param1
:
Returns
:
gnutls_calloc_function ()
../shishi/shishi-shishi.html#void
void
*       (*gnutls_calloc_function)       (size_t,
size_t);
Param1
:
Param2
:
Returns
:
gnutls_is_secure_function ()
int         (*gnutls_is_secure_function)    (const
../shishi/shishi-shishi.html#void
void
*);
Param1
:
Returns
:
gnutls_free_function ()
../shishi/shishi-shishi.html#void
void
(*gnutls_free_function)         (
../shishi/shishi-shishi.html#void
void
*);
Param1
:
gnutls_realloc_function ()
../shishi/shishi-shishi.html#void
void
*       (*gnutls_realloc_function)      (
../shishi/shishi-shishi.html#void
void
*,
size_t);
Param1
:
Param2
:
Returns
:
gnutls_global_set_mem_functions ()
../shishi/shishi-shishi.html#void
void
gnutls_global_set_mem_functions (
gnutls-gnutls.html#gnutls-alloc-function
gnutls_alloc_function
alloc_func,
gnutls-gnutls.html#gnutls-alloc-function
gnutls_alloc_function
secure_alloc_func,
gnutls-gnutls.html#gnutls-is-secure-function
gnutls_is_secure_function
is_secure_func,
gnutls-gnutls.html#gnutls-realloc-function
gnutls_realloc_function
realloc_func,
gnutls-gnutls.html#gnutls-free-function
gnutls_free_function
free_func);
This is the function were you set the memory allocation functions gnutls
is going to use. By default the libc's allocation functions (
malloc()
,
free()
),
are used by gnutls, to allocate both sensitive and not sensitive data.
This function is provided to set the memory allocation functions to
something other than the defaults (ie the gcrypt allocation functions).
This function must be called before
gnutls-gnutls.html#gnutls-global-init
gnutls_global_init()
is called.
alloc_func
:
it's the default memory allocation function. Like
malloc()
.
secure_alloc_func
:
This is the memory allocation function that will be used for sensitive data.
is_secure_func
:
a function that returns 0 if the memory given is not secure. May be NULL.
realloc_func
:
A realloc function
free_func
:
The function that frees allocated data. Must accept a NULL pointer.
gnutls_malloc
extern gnutls_alloc_function gnutls_malloc;
This function will allocate 's' bytes data, and
return a pointer to memory. This function is supposed
to be used by callbacks.
The allocation function used is the one set by
gnutls-gnutls.html#gnutls-global-set-mem-functions
gnutls_global_set_mem_functions()
.
gnutls_secure_malloc
extern gnutls_alloc_function gnutls_secure_malloc;
gnutls_realloc
extern gnutls_realloc_function gnutls_realloc;
gnutls_calloc
extern gnutls_calloc_function gnutls_calloc;
gnutls_free
extern gnutls_free_function gnutls_free;
This function will free data pointed by ptr.
The deallocation function used is the one set by
gnutls-gnutls.html#gnutls-global-set-mem-functions
gnutls_global_set_mem_functions()
.
gnutls_log_func ()
../shishi/shishi-shishi.html#void
void
(*gnutls_log_func)              (...,
const char*);
...
:
Param2
:
gnutls_global_set_log_function ()
../shishi/shishi-shishi.html#void
void
gnutls_global_set_log_function  (
gnutls-gnutls.html#gnutls-log-func
gnutls_log_func
log_func);
This is the function where you set the logging function gnutls
is going to use. This function only accepts a character array.
Normally you may not use this function since it is only used
for debugging purposes.
gnutls_log_func is of the form,
void (*gnutls_log_func)( int level, const char*);
log_func
:
it's a log function
gnutls_global_set_log_level ()
../shishi/shishi-shishi.html#void
void
gnutls_global_set_log_level     (int level);
This is the function that allows you to set the log level.
The level is an integer between 0 and 9. Higher values mean
more verbosity. The default value is 0. Larger values should
only be used with care, since they may reveal sensitive information.
Use a log level over 10 to enable all debugging options.
level
:
it's an integer from 0 to 9.
gnutls_dh_params_init ()
int         gnutls_dh_params_init           (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
*dh_params);
This function will initialize the DH parameters structure.
dh_params
:
Is a structure that will hold the prime numbers
Returns
:
gnutls_dh_params_deinit ()
../shishi/shishi-shishi.html#void
void
gnutls_dh_params_deinit         (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params);
This function will deinitialize the DH parameters structure.
dh_params
:
Is a structure that holds the prime numbers
gnutls_dh_params_import_raw ()
int         gnutls_dh_params_import_raw     (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dh_params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator);
This function will replace the pair of prime and generator for use in
the Diffie-Hellman key exchange. The new parameters should be stored in the
appropriate gnutls_datum.
dh_params
:
Is a structure that will hold the prime numbers
prime
:
holds the new prime
generator
:
holds the new generator
Returns
:
gnutls_dh_params_import_pkcs3 ()
int         gnutls_dh_params_import_pkcs3   (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*pkcs3_params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format);
This function will extract the DHParams found in a PKCS3 formatted
structure. This is the format generated by "openssl dhparam" tool.
If the structure is PEM encoded, it should have a header
of "BEGIN DH PARAMETERS".
In case of failure a negative value will be returned, and
0 on success.
params
:
A structure where the parameters will be copied to
pkcs3_params
:
should contain a PKCS3 DHParams structure PEM or DER encoded
format
:
the format of params. PEM or DER.
Returns
:
gnutls_dh_params_generate2 ()
int         gnutls_dh_params_generate2      (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
unsigned int bits);
This function will generate a new pair of prime and generator for use in
the Diffie-Hellman key exchange. The new parameters will be allocated using
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
and will be stored in the appropriate datum.
This function is normally slow.
Note that the bits value should be one of 768, 1024, 2048, 3072 or 4096.
Also note that the DH parameters are only useful to servers.
Since clients use the parameters sent by the server, it's of
no use to call this in client side.
params
:
Is the structure that the DH parameters will be stored
bits
:
is the prime's number of bits
Returns
:
gnutls_dh_params_export_pkcs3 ()
int         gnutls_dh_params_export_pkcs3   (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format,
unsigned char *params_data,
size_t *params_data_size);
This function will export the given dh parameters to a PKCS3
DHParams structure. This is the format generated by "openssl dhparam" tool.
If the buffer provided is not long enough to hold the output, then
GNUTLS_E_SHORT_MEMORY_BUFFER will be returned.
If the structure is PEM encoded, it will have a header
of "BEGIN DH PARAMETERS".
In case of failure a negative value will be returned, and
0 on success.
params
:
Holds the DH parameters
format
:
the format of output params. One of PEM or DER.
params_data
:
will contain a PKCS3 DHParams structure PEM or DER encoded
params_data_size
:
holds the size of params_data (and will be replaced by the actual size of parameters)
Returns
:
gnutls_dh_params_export_raw ()
int         gnutls_dh_params_export_raw     (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
params,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator,
unsigned int *bits);
This function will export the pair of prime and generator for use in
the Diffie-Hellman key exchange. The new parameters will be allocated using
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
and will be stored in the appropriate datum.
params
:
Holds the DH parameters
prime
:
will hold the new prime
generator
:
will hold the new generator
bits
:
if non null will hold is the prime's number of bits
Returns
:
gnutls_dh_params_cpy ()
int         gnutls_dh_params_cpy            (
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
dst,
gnutls-gnutls.html#gnutls-dh-params-t
gnutls_dh_params_t
src);
This function will copy the DH parameters structure from source
to destination.
dst
:
Is the destination structure, which should be initialized.
src
:
Is the source structure
Returns
:
gnutls_rsa_params_init ()
int         gnutls_rsa_params_init          (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
*rsa_params);
This function will initialize the temporary RSA parameters structure.
rsa_params
:
Is a structure that will hold the parameters
Returns
:
gnutls_rsa_params_deinit ()
../shishi/shishi-shishi.html#void
void
gnutls_rsa_params_deinit        (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params);
This function will deinitialize the RSA parameters structure.
rsa_params
:
Is a structure that holds the parameters
gnutls_rsa_params_cpy ()
int         gnutls_rsa_params_cpy           (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
dst,
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
src);
This function will copy the RSA parameters structure from source
to destination.
dst
:
Is the destination structure, which should be initialized.
src
:
Is the source structure
Returns
:
gnutls_rsa_params_import_raw ()
int         gnutls_rsa_params_import_raw    (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
rsa_params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*m,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*e,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*d,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*p,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*q,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*u);
This function will replace the parameters in the given structure.
The new parameters should be stored in the appropriate gnutls_datum.
rsa_params
:
Is a structure will hold the parameters
m
:
holds the modulus
e
:
holds the public exponent
d
:
holds the private exponent
p
:
holds the first prime (p)
q
:
holds the second prime (q)
u
:
holds the coefficient
Returns
:
gnutls_rsa_params_generate2 ()
int         gnutls_rsa_params_generate2     (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
unsigned int bits);
This function will generate new temporary RSA parameters for use in
RSA-EXPORT ciphersuites.  This function is normally slow.
Note that if the parameters are to be used in export cipher suites the
bits value should be 512 or less.
Also note that the generation of new RSA parameters is only useful
to servers. Clients use the parameters sent by the server, thus it's
no use calling this in client side.
params
:
The structure where the parameters will be stored
bits
:
is the prime's number of bits
Returns
:
gnutls_rsa_params_export_raw ()
int         gnutls_rsa_params_export_raw    (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*m,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*e,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*d,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*p,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*q,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*u,
unsigned int *bits);
This function will export the RSA parameters found in the given
structure. The new parameters will be allocated using
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
and will be stored in the appropriate datum.
params
:
a structure that holds the rsa parameters
m
:
will hold the modulus
e
:
will hold the public exponent
d
:
will hold the private exponent
p
:
will hold the first prime (p)
q
:
will hold the second prime (q)
u
:
will hold the coefficient
bits
:
if non null will hold the prime's number of bits
Returns
:
gnutls_rsa_params_export_pkcs1 ()
int         gnutls_rsa_params_export_pkcs1  (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format,
unsigned char *params_data,
size_t *params_data_size);
This function will export the given RSA parameters to a PKCS1
RSAPublicKey structure. If the buffer provided is not long enough to
hold the output, then GNUTLS_E_SHORT_MEMORY_BUFFER will be returned.
If the structure is PEM encoded, it will have a header
of "BEGIN RSA PRIVATE KEY".
In case of failure a negative value will be returned, and
0 on success.
params
:
Holds the RSA parameters
format
:
the format of output params. One of PEM or DER.
params_data
:
will contain a PKCS1 RSAPublicKey structure PEM or DER encoded
params_data_size
:
holds the size of params_data (and will be replaced by the actual size of parameters)
Returns
:
gnutls_rsa_params_import_pkcs1 ()
int         gnutls_rsa_params_import_pkcs1  (
gnutls-gnutls.html#gnutls-rsa-params-t
gnutls_rsa_params_t
params,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*pkcs1_params,
gnutls-gnutls.html#gnutls-x509-crt-fmt-t
gnutls_x509_crt_fmt_t
format);
This function will extract the RSAPublicKey found in a PKCS1 formatted
structure.
If the structure is PEM encoded, it should have a header
of "BEGIN RSA PRIVATE KEY".
In case of failure a negative value will be returned, and
0 on success.
params
:
A structure where the parameters will be copied to
pkcs1_params
:
should contain a PKCS1 RSAPublicKey structure PEM or DER encoded
format
:
the format of params. PEM or DER.
Returns
:
gnutls_pull_func ()
ssize_t     (*gnutls_pull_func)             (
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
,
../shishi/shishi-shishi.html#void
void
*,
size_t);
Param1
:
Param2
:
Param3
:
Returns
:
gnutls_push_func ()
ssize_t     (*gnutls_push_func)             (
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
,
const
../shishi/shishi-shishi.html#void
void
*,
size_t);
Param1
:
Param2
:
Param3
:
Returns
:
gnutls_transport_set_ptr ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_set_ptr        (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
ptr);
Used to set the first argument of the transport function (like PUSH and
PULL). In berkeley style sockets this function will set the connection
handle.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
ptr
:
is the value.
gnutls_transport_set_ptr2 ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_set_ptr2       (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
recv_ptr,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
send_ptr);
Used to set the first argument of the transport function (like PUSH and
PULL). In berkeley style sockets this function will set the connection
handle. With this function you can use two different pointers for
receiving and sending.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
recv_ptr
:
is the value for the pull function
send_ptr
:
is the value for the push function
gnutls_transport_get_ptr ()
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
gnutls_transport_get_ptr
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
Used to get the first argument of the transport function (like PUSH and
PULL). This must have been set using
gnutls-gnutls.html#gnutls-transport-set-ptr
gnutls_transport_set_ptr()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_transport_get_ptr2 ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_get_ptr2       (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
*recv_ptr,
gnutls-gnutls.html#gnutls-transport-ptr-t
gnutls_transport_ptr_t
*send_ptr);
Used to get the arguments of the transport functions (like PUSH and
PULL). These should have been set using
gnutls-gnutls.html#gnutls-transport-set-ptr2
gnutls_transport_set_ptr2()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
recv_ptr
:
will hold the value for the pull function
send_ptr
:
will hold the value for the push function
gnutls_transport_set_lowat ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_set_lowat      (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
int num);
Used to set the lowat value in order for select to check
if there are pending data to socket buffer. Used only
if you have changed the default low water value (default is 1).
Normally you will not need that function.
This function is only useful if using berkeley style sockets.
Otherwise it must be called and set lowat to zero.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
num
:
is the low water value.
gnutls_transport_set_push_function ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_set_push_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-push-func
gnutls_push_func
push_func);
This is the function where you set a push function for gnutls
to use in order to send data. If you are going to use berkeley style
sockets, you may not use this function since
the default (send(2)) will probably be ok. Otherwise you should
specify this function for gnutls to be able to send data.
This function should be called once and after
gnutls-gnutls.html#gnutls-global-init
gnutls_global_init()
.
PUSH_FUNC is of the form,
ssize_t (*gnutls_push_func)(gnutls_transport_ptr_t, const void*, size_t);
session
:
gnutls session
push_func
:
it's a function like write
gnutls_transport_set_pull_function ()
../shishi/shishi-shishi.html#void
void
gnutls_transport_set_pull_function
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-pull-func
gnutls_pull_func
pull_func);
This is the function where you set a function for gnutls
to receive data. Normally, if you use berkeley style sockets,
you may not use this function since the default (recv(2)) will
probably be ok.
This function should be called once and after
gnutls-gnutls.html#gnutls-global-init
gnutls_global_init()
.
PULL_FUNC is of the form,
ssize_t (*gnutls_pull_func)(gnutls_transport_ptr_t, const void*, size_t);
session
:
gnutls session
pull_func
:
it's a function like read
gnutls_session_set_ptr ()
../shishi/shishi-shishi.html#void
void
gnutls_session_set_ptr          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
../shishi/shishi-shishi.html#void
void
*ptr);
This function will set (associate) the user given pointer to the
session structure.  This is pointer can be accessed with
gnutls-gnutls.html#gnutls-session-get-ptr
gnutls_session_get_ptr()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
ptr
:
is the user pointer
gnutls_session_get_ptr ()
../shishi/shishi-shishi.html#void
void
*       gnutls_session_get_ptr          (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the user given pointer from the session structure.
This is the pointer set with
gnutls-gnutls.html#gnutls-session-set-ptr
gnutls_session_set_ptr()
.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
gnutls_openpgp_send_key ()
../shishi/shishi-shishi.html#void
void
gnutls_openpgp_send_key         (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-openpgp-key-status-t
gnutls_openpgp_key_status_t
status);
This function will order gnutls to send the key fingerprint instead
of the key in the initial handshake procedure. This should be used
with care and only when there is indication or knowledge that the
server can obtain the client's key.
session
:
is a pointer to a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
status
:
is one of OPENPGP_KEY, or OPENPGP_KEY_FINGERPRINT
gnutls_fingerprint ()
int         gnutls_fingerprint              (
gnutls-gnutls.html#gnutls-digest-algorithm-t
gnutls_digest_algorithm_t
algo,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
../shishi/shishi-shishi.html#void
void
*result,
size_t *result_size);
This function will calculate a fingerprint (actually a hash), of the
given data. The result is not printable data. You should convert it
to hex, or to something else printable.
This is the usual way to calculate a fingerprint of an X.509
DER encoded certificate. Note however that the fingerprint
of an OpenPGP is not just a hash and cannot be calculated with
this function.
algo
:
is a digest algorithm
data
:
is the data
result
:
is the place where the result will be copied (may be null).
result_size
:
should hold the size of the result. The actual size
of the returned result will also be copied there.
Returns
:
a negative value in case of an error.
gnutls_srp_server_credentials_t
typedef struct gnutls_srp_server_credentials_st* gnutls_srp_server_credentials_t;
gnutls_srp_client_credentials_t
typedef struct gnutls_srp_client_credentials_st* gnutls_srp_client_credentials_t;
gnutls_srp_free_client_credentials ()
../shishi/shishi-shishi.html#void
void
gnutls_srp_free_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to free (deallocate) it.
sc
:
is an
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
structure.
gnutls_srp_allocate_client_credentials ()
int         gnutls_srp_allocate_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
*sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to allocate it.
sc
:
is a pointer to an
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
Returns
:
0 on success.
gnutls_srp_set_client_credentials ()
int         gnutls_srp_set_client_credentials
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
res,
char *username,
char *password);
This function sets the username and password, in a gnutls_srp_client_credentials_t structure.
Those will be used in SRP authentication.
username
and
password
should be ASCII
strings or UTF-8 strings prepared using the "SASLprep" profile of "stringprep".
res
:
is an
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
structure.
username
:
is the user's userid
password
:
is the user's password
Returns
:
0 on success.
gnutls_srp_free_server_credentials ()
../shishi/shishi-shishi.html#void
void
gnutls_srp_free_server_credentials
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to free (deallocate) it.
sc
:
is an
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
gnutls_srp_allocate_server_credentials ()
int         gnutls_srp_allocate_server_credentials
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
*sc);
This structure is complex enough to manipulate directly thus
this helper function is provided in order to allocate it.
sc
:
is a pointer to an
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
Returns
:
0 on success.
gnutls_srp_set_server_credentials_file ()
int         gnutls_srp_set_server_credentials_file
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
res,
const char *password_file,
const char *password_conf_file);
This function sets the password files, in a gnutls_srp_server_credentials_t structure.
Those password files hold usernames and verifiers and will be used for SRP authentication.
res
:
is an
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
password_file
:
is the SRP password file (tpasswd)
password_conf_file
:
is the SRP password conf file (tpasswd.conf)
Returns
:
0 on success.
gnutls_srp_server_get_username ()
const char* gnutls_srp_server_get_username  (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the username of the peer. This should only be
called in case of SRP authentication and in case of a server.
session
:
is a gnutls session
Returns
:
NULL in case of an error.
gnutls_srp_verifier ()
int         gnutls_srp_verifier             (const char *username,
const char *password,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*salt,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*generator,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*prime,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*res);
This function will create an SRP verifier, as specified in RFC2945.
The
prime
and
generator
should be one of the static parameters defined
in gnutls/extra.h or may be generated using the GCRYPT functions
gcry_prime_generate()
and
gcry_prime_group_generator()
.
The verifier will be allocated with
malloc
and will be stored in
res
using
binary format.
username
:
is the user's name
password
:
is the user's password
salt
:
should be some randomly generated bytes
generator
:
is the generator of the group
prime
:
is the group's prime
res
:
where the verifier will be stored.
Returns
:
gnutls_srp_2048_group_prime
extern const gnutls_datum_t gnutls_srp_2048_group_prime;
gnutls_srp_2048_group_generator
extern const gnutls_datum_t gnutls_srp_2048_group_generator;
gnutls_srp_1536_group_prime
extern const gnutls_datum_t gnutls_srp_1536_group_prime;
gnutls_srp_1536_group_generator
extern const gnutls_datum_t gnutls_srp_1536_group_generator;
gnutls_srp_1024_group_prime
extern const gnutls_datum_t gnutls_srp_1024_group_prime;
gnutls_srp_1024_group_generator
extern const gnutls_datum_t gnutls_srp_1024_group_generator;
gnutls_srp_set_server_credentials_function ()
../shishi/shishi-shishi.html#void
void
gnutls_srp_set_server_credentials_function
(
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
cred,
gnutls_srp_server_credentials_function *func);
This function can be used to set a callback to retrieve the user's SRP credentials.
The callback's function form is:
int (*callback)(gnutls_session_t, const char* username,
gnutls_datum_t* salt, gnutls_datum_t *verifier, gnutls_datum_t* g,
gnutls_datum_t* n);
username
contains the actual username.
The
salt
,
verifier
,
generator
and
prime
must be filled
in using the
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
. For convenience
prime
and
generator
may also be one of the static parameters defined in extra.h.
In case the callback returned a negative number then gnutls will
assume that the username does not exist.
In order to prevent attackers from guessing valid usernames,
if a user does not exist, g and n values should be filled in
using a random user's parameters. In that case the callback must
return the special value (1).
The callback function will only be called once per handshake.
The callback function should return 0 on success, while
-1 indicates an error.
cred
:
is a
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
func
:
is the callback function
gnutls_srp_set_client_credentials_function ()
../shishi/shishi-shishi.html#void
void
gnutls_srp_set_client_credentials_function
(
gnutls-gnutls.html#gnutls-srp-client-credentials-t
gnutls_srp_client_credentials_t
cred,
gnutls_srp_client_credentials_function *func);
This function can be used to set a callback to retrieve the username and
password for client SRP authentication.
The callback's function form is:
int (*callback)(gnutls_session_t, unsigned int times, char** username,
char** password);
The
username
and
password
must be allocated using
gnutls-gnutls.html#gnutls-malloc
gnutls_malloc()
.
times
will be 0 the first time called, and 1 the second.
username
and
password
should be ASCII strings or UTF-8 strings
prepared using the "SASLprep" profile of "stringprep".
The callback function will be called once or twice per handshake.
The first time called, is before the ciphersuite is negotiated.
At that time if the callback returns a negative error code,
the callback will be called again if SRP has been
negotiated. This uses a special TLS-SRP idiom in order to avoid
asking the user for SRP password and username if the server does
not support SRP.
The callback should not return a negative error code the second
time called, since the handshake procedure will be aborted.
The callback function should return 0 on success.
-1 indicates an error.
cred
:
is a
gnutls-gnutls.html#gnutls-srp-server-credentials-t
gnutls_srp_server_credentials_t
structure.
func
:
is the callback function
gnutls_srp_base64_encode ()
int         gnutls_srp_base64_encode        (const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
char *result,
int *result_size);
This function will convert the given data to printable data, using the base64
encoding, as used in the libsrp. This is the encoding used in SRP password files.
If the provided buffer is not long enough GNUTLS_E_SHORT_MEMORY_BUFFER is returned.
data
:
contain the raw data
result
:
the place where base64 data will be copied
result_size
:
holds the size of the result
Returns
:
gnutls_srp_base64_encode_alloc ()
int         gnutls_srp_base64_encode_alloc  (const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
This function will convert the given data to printable data, using the base64
encoding. This is the encoding used in SRP password files. This function will
allocate the required memory to hold the encoded data.
You should use
gnutls-gnutls.html#gnutls-free
gnutls_free()
to free the returned data.
data
:
contains the raw data
result
:
will hold the newly allocated encoded data
Returns
:
gnutls_srp_base64_decode ()
int         gnutls_srp_base64_decode        (const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
char *result,
int *result_size);
This function will decode the given encoded data, using the base64 encoding
found in libsrp.
Note that b64_data should be null terminated.
b64_data
:
contain the encoded data
result
:
the place where decoded data will be copied
result_size
:
holds the size of the result
Returns
:
GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer given is not long enough,
or 0 on success.
gnutls_srp_base64_decode_alloc ()
int         gnutls_srp_base64_decode_alloc  (const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
This function will decode the given encoded data. The decoded data
will be allocated, and stored into result.
It will decode using the base64 algorithm found in libsrp.
You should use
gnutls-gnutls.html#gnutls-free
gnutls_free()
to free the returned data.
b64_data
:
contains the encoded data
result
:
the place where decoded data lie
Returns
:
GNUTLS_UI_H
# define GNUTLS_UI_H
enum gnutls_x509_subject_alt_name_t
typedef enum gnutls_x509_subject_alt_name_t {
GNUTLS_SAN_DNSNAME = 1, GNUTLS_SAN_RFC822NAME,
GNUTLS_SAN_URI, GNUTLS_SAN_IPADDRESS
} gnutls_x509_subject_alt_name_t;
gnutls_openpgp_key_int
typedef struct {
cdk_kbnode_t knode;
cdk_stream_t inp;
} gnutls_openpgp_key_int;
gnutls_openpgp_key_t
typedef struct gnutls_openpgp_key_int *gnutls_openpgp_key_t;
gnutls_openpgp_privkey_int
typedef struct {
gnutls_privkey pkey;
} gnutls_openpgp_privkey_int;
gnutls_openpgp_privkey_t
typedef struct gnutls_openpgp_privkey_int *gnutls_openpgp_privkey_t;
key
typedef struct {
gnutls_certificate_type_t type;
union cert {
gnutls_x509_crt_t *x509;
gnutls_openpgp_key_t pgp;
} cert;
unsigned int ncerts;	/* one for pgp keys */
union key {
gnutls_x509_privkey_t x509;
gnutls_openpgp_privkey_t pgp;
} key;
gnutls_auth_get_type ()
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls_auth_get_type
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Returns
:
type of credentials for the current authentication schema.
The returned information is to be used to distinguish the function used
to access authentication data.
Eg. for CERTIFICATE ciphersuites (key exchange algorithms: KX_RSA, KX_DHE_RSA),
the same function are to be used to access the authentication data.
gnutls_auth_server_get_type ()
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls_auth_server_get_type
(gnutls_session_tsession);
Param1
:
Returns
:
the type of credentials that were used for server authentication.
The returned information is to be used to distinguish the function used
to access authentication data.
gnutls_auth_client_get_type ()
gnutls-gnutls.html#gnutls-credentials-type-t
gnutls_credentials_type_t
gnutls_auth_client_get_type
(gnutls_session_tsession);
Param1
:
Returns
:
the type of credentials that were used for client authentication.
The returned information is to be used to distinguish the function used
to access authentication data.
gnutls_dh_set_prime_bits ()
../shishi/shishi-shishi.html#void
void
gnutls_dh_set_prime_bits        (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
unsigned int bits);
This function sets the number of bits, for use in an
Diffie Hellman key exchange. This is used both in DH ephemeral and
DH anonymous cipher suites. This will set the
minimum size of the prime that will be used for the handshake.
In the client side it sets the minimum accepted number of bits.
If a server sends a prime with less bits than that
GNUTLS_E_DH_PRIME_UNACCEPTABLE will be returned by the
handshake.
session
:
is a
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
bits
:
is the number of bits
gnutls_dh_get_secret_bits ()
int         gnutls_dh_get_secret_bits       (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the bits used in the last Diffie Hellman authentication
with the peer. Should be used for both anonymous and ephemeral diffie Hellman.
session
:
is a gnutls session
Returns
:
a negative value in case of an error.
gnutls_dh_get_peers_public_bits ()
int         gnutls_dh_get_peers_public_bits (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the bits used in the last Diffie Hellman authentication
with the peer. Should be used for both anonymous and ephemeral diffie Hellman.
session
:
is a gnutls session
Returns
:
a negative value in case of an error.
gnutls_dh_get_prime_bits ()
int         gnutls_dh_get_prime_bits        (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the bits of the prime used in the last Diffie Hellman authentication
with the peer. Should be used for both anonymous and ephemeral diffie Hellman.
session
:
is a gnutls session
Returns
:
a negative value in case of an error.
gnutls_dh_get_group ()
int         gnutls_dh_get_group             (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_gen,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_prime);
This function will return the group parameters used in the last Diffie Hellman
authentication with the peer. These are the prime and the generator used.
This function should be used for both anonymous and ephemeral diffie Hellman.
The output parameters must be freed with
gnutls-gnutls.html#gnutls-free
gnutls_free()
.
session
:
is a gnutls session
raw_gen
:
will hold the generator.
raw_prime
:
will hold the prime.
Returns
:
a negative value in case of an error.
gnutls_dh_get_pubkey ()
int         gnutls_dh_get_pubkey            (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*raw_key);
This function will return the peer's public key used in the last Diffie Hellman authentication.
This function should be used for both anonymous and ephemeral diffie Hellman.
The output parameters must be freed with
gnutls-gnutls.html#gnutls-free
gnutls_free()
.
session
:
is a gnutls session
raw_key
:
will hold the public key.
Returns
:
a negative value in case of an error.
gnutls_rsa_export_get_pubkey ()
int         gnutls_rsa_export_get_pubkey    (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*exponent,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*modulus);
This function will return the peer's public key exponent and
modulus used in the last RSA-EXPORT authentication.  The output
parameters must be freed with
gnutls-gnutls.html#gnutls-free
gnutls_free()
.
session
:
is a gnutls session
exponent
:
will hold the exponent.
modulus
:
will hold the modulus.
Returns
:
a negative value in case of an error.
gnutls_rsa_export_get_modulus_bits ()
int         gnutls_rsa_export_get_modulus_bits
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the bits used in the last RSA-EXPORT key exchange
with the peer.
session
:
is a gnutls session
Returns
:
a negative value in case of an error.
gnutls_certificate_client_set_retrieve_function ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_client_set_retrieve_function
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
cred,
gnutls_certificate_client_retrieve_function *func);
This function sets a callback to be called in order to retrieve the certificate
to be used in the handshake.
The callback's function prototype is:
int (*callback)(gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs,
gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_retr_st* st);
st
should contain the certificates and private keys.
req_ca_cert
, is only used in X.509 certificates.
Contains a list with the CA names that the server considers trusted.
Normally we should send a certificate that is signed
by one of these CAs. These names are DER encoded. To get a more
meaningful value use the function
gnutls_x509_rdn_get()
.
pk_algos
, contains a list with server's acceptable signature algorithms.
The certificate returned should support the server's given algorithms.
If the callback function is provided then gnutls will call it, in the
handshake, after the certificate request message has been received.
The callback function should set the certificate list to be sent, and
return 0 on success. If no certificate was selected then the number of certificates
should be set to zero. The value (-1) indicates error and the handshake
will be terminated.
cred
:
is a
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
func
:
is the callback function
gnutls_certificate_server_set_retrieve_function ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_server_set_retrieve_function
(
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
cred,
gnutls_certificate_server_retrieve_function *func);
This function sets a callback to be called in order to retrieve the certificate
to be used in the handshake.
The callback's function prototype is:
int (*callback)(gnutls_session_t, gnutls_retr_st* st);
st
should contain the certificates and private keys.
If the callback function is provided then gnutls will call it, in the
handshake, after the certificate request message has been received.
The callback function should set the certificate list to be sent, and
return 0 on success.  The value (-1) indicates error and the handshake
will be terminated.
cred
:
is a
gnutls-gnutls.html#gnutls-certificate-credentials-t
gnutls_certificate_credentials_t
structure.
func
:
is the callback function
gnutls_certificate_server_set_request ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_server_set_request
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
gnutls_certificate_request_treq);
This function specifies if we (in case of a server) are going
to send a certificate request message to the client. If
req
is GNUTLS_CERT_REQUIRE then the server will return an error if
the peer does not provide a certificate. If you do not
call this function then the client will not be asked to
send a certificate.
session
:
is an
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
structure.
Param2
:
gnutls_certificate_get_peers ()
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
* gnutls_certificate_get_peers
(gnutls_session_tsession,
unsigned int *list_size);
This function will return the peer's raw certificate (chain) as
sent by the peer. These certificates are in raw format (DER encoded
for X.509). In case of a X.509 then a certificate list may be present.
The first certificate in the list is the peer's certificate,
following the issuer's certificate, then the issuer's issuer etc.
In case of OpenPGP keys a single key will be returned
in raw format.
Param1
:
list_size
:
is the length of the certificate list
Returns
:
NULL in case of an error, or if no certificate was sent.
gnutls_certificate_get_ours ()
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
* gnutls_certificate_get_ours
(gnutls_session_tsession);
This function will return the certificate as sent to the peer,
in the last handshake. These certificates are in raw format.
In X.509 this is a certificate list. In OpenPGP this is a single
certificate.
Param1
:
Returns
:
NULL in case of an error, or if no certificate was used.
gnutls_certificate_activation_time_peers ()
time_t      gnutls_certificate_activation_time_peers
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the peer's certificate activation time.
This is the creation time for openpgp keys.
session
:
is a gnutls session
Returns
:
(time_t) -1 on error.
gnutls_certificate_expiration_time_peers ()
time_t      gnutls_certificate_expiration_time_peers
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return the peer's certificate expiration time.
session
:
is a gnutls session
Returns
:
(time_t) -1 on error.
gnutls_certificate_client_get_request_status ()
int         gnutls_certificate_client_get_request_status
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
This function will return 0 if the peer (server) did not request client
authentication or 1 otherwise.
session
:
is a gnutls session
Returns
:
a negative value in case of an error.
gnutls_certificate_verify_peers2 ()
int         gnutls_certificate_verify_peers2
(
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session,
unsigned int *status);
This function will try to verify the peer's certificate and return its status (trusted, invalid etc.).
The value of
status
should be one or more of the gnutls_certificate_status_t
enumerated elements bitwise or'd. To avoid denial of service attacks
some default upper limits regarding the certificate key size and
chain size are set. To override them use
gnutls-gnutls.html#gnutls-certificate-set-verify-limits
gnutls_certificate_set_verify_limits()
.
Note that you must also check the peer's name in order to
check if the verified certificate belongs to the actual peer.
session
:
is a gnutls session
status
:
is the output of the verification
Returns
:
a negative error code on error and zero on success.
This is the same as
gnutls_x509_verify_certificate()
and
uses the loaded CAs in the credentials as trusted CAs.
gnutls_certificate_verify_peers ()
int         gnutls_certificate_verify_peers (
gnutls-gnutls.html#gnutls-session-t
gnutls_session_t
session);
session
:
Returns
:
gnutls_pem_base64_encode ()
int         gnutls_pem_base64_encode        (const char *msg,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
char *result,
size_t *result_size);
This function will convert the given data to printable data, using the base64
encoding. This is the encoding used in PEM messages. If the provided
buffer is not long enough GNUTLS_E_SHORT_MEMORY_BUFFER is returned.
The output string will be null terminated, although the size will not include
the terminating null.
msg
:
is a message to be put in the header
data
:
contain the raw data
result
:
the place where base64 data will be copied
result_size
:
holds the size of the result
Returns
:
gnutls_pem_base64_decode ()
int         gnutls_pem_base64_decode        (const char *header,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
unsigned char *result,
size_t *result_size);
This function will decode the given encoded data. If the header given
is non null this function will search for "-----BEGIN header" and decode
only this part. Otherwise it will decode the first PEM packet found.
header
:
A null terminated string with the PEM header (eg. CERTIFICATE)
b64_data
:
contain the encoded data
result
:
the place where decoded data will be copied
result_size
:
holds the size of the result
Returns
:
GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer given is not long enough,
or 0 on success.
gnutls_pem_base64_encode_alloc ()
int         gnutls_pem_base64_encode_alloc  (const char *msg,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
This function will convert the given data to printable data, using the base64
encoding. This is the encoding used in PEM messages. This function will
allocate the required memory to hold the encoded data.
You should use
gnutls-gnutls.html#gnutls-free
gnutls_free()
to free the returned data.
msg
:
is a message to be put in the encoded header
data
:
contains the raw data
result
:
will hold the newly allocated encoded data
Returns
:
gnutls_pem_base64_decode_alloc ()
int         gnutls_pem_base64_decode_alloc  (const char *header,
const
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*b64_data,
gnutls-gnutls.html#gnutls-datum-t
gnutls_datum_t
*result);
This function will decode the given encoded data. The decoded data
will be allocated, and stored into result.
If the header given is non null this function will search for
"-----BEGIN header" and decode only this part. Otherwise it will decode the
first PEM packet found.
You should use
gnutls-gnutls.html#gnutls-free
gnutls_free()
to free the returned data.
header
:
The PEM header (eg. CERTIFICATE)
b64_data
:
contains the encoded data
result
:
the place where decoded data lie
Returns
:
GNUTLS_KEY_DIGITAL_SIGNATURE
#define GNUTLS_KEY_DIGITAL_SIGNATURE            128	/* when the key is to be
GNUTLS_KEY_NON_REPUDIATION
#define GNUTLS_KEY_NON_REPUDIATION              64
GNUTLS_KEY_KEY_ENCIPHERMENT
#define GNUTLS_KEY_KEY_ENCIPHERMENT             32	/* when the key is to be
GNUTLS_KEY_DATA_ENCIPHERMENT
#define GNUTLS_KEY_DATA_ENCIPHERMENT            16
GNUTLS_KEY_KEY_AGREEMENT
#define GNUTLS_KEY_KEY_AGREEMENT                8
GNUTLS_KEY_KEY_CERT_SIGN
#define GNUTLS_KEY_KEY_CERT_SIGN                4
GNUTLS_KEY_CRL_SIGN
#define GNUTLS_KEY_CRL_SIGN                     2
GNUTLS_KEY_ENCIPHER_ONLY
#define GNUTLS_KEY_ENCIPHER_ONLY                1
GNUTLS_KEY_DECIPHER_ONLY
#define GNUTLS_KEY_DECIPHER_ONLY                32768
gnutls_params_st
typedef struct {
gnutls_params_type_t type;
union params {
gnutls_dh_params_t dh;
gnutls_rsa_params_t rsa_export;
} params;
int deinit;
} gnutls_params_st;
gnutls_certificate_set_params_function ()
../shishi/shishi-shishi.html#void
void
gnutls_certificate_set_params_function
(gnutls_certificate_credentials_tres,
gnutls_params_function *func);
This function will set a callback in order for the server to get the
diffie hellman or RSA parameters for certificate authentication. The callback
should return zero on success.
Param1
:
func
:
is the function to be called
gnutls_anon_set_params_function ()
../shishi/shishi-shishi.html#void
void
gnutls_anon_set_params_function (
gnutls-gnutls.html#gnutls-anon-server-credentials-t
gnutls_anon_server_credentials_t
res,
gnutls_params_function *func);
This function will set a callback in order for the server to get the
diffie hellman parameters for anonymous authentication. The callback should
return zero on success.
res
:
is a gnutls_certificate_credentials_t structure
func
:
is the function to be called
GNUTLS_E_SUCCESS
#define GNUTLS_E_SUCCESS 0
GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM
#define	GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM -3
GNUTLS_E_UNKNOWN_CIPHER_TYPE
#define	GNUTLS_E_UNKNOWN_CIPHER_TYPE -6
GNUTLS_E_LARGE_PACKET
#define	GNUTLS_E_LARGE_PACKET -7
GNUTLS_E_UNSUPPORTED_VERSION_PACKET
#define GNUTLS_E_UNSUPPORTED_VERSION_PACKET -8	/* GNUTLS_A_PROTOCOL_VERSION */
GNUTLS_E_UNEXPECTED_PACKET_LENGTH
#define GNUTLS_E_UNEXPECTED_PACKET_LENGTH -9	/* GNUTLS_A_RECORD_OVERFLOW */
GNUTLS_E_INVALID_SESSION
#define GNUTLS_E_INVALID_SESSION -10
GNUTLS_E_FATAL_ALERT_RECEIVED
#define GNUTLS_E_FATAL_ALERT_RECEIVED -12
GNUTLS_E_UNEXPECTED_PACKET
#define GNUTLS_E_UNEXPECTED_PACKET -15	/* GNUTLS_A_UNEXPECTED_MESSAGE */
GNUTLS_E_WARNING_ALERT_RECEIVED
#define GNUTLS_E_WARNING_ALERT_RECEIVED -16
GNUTLS_E_ERROR_IN_FINISHED_PACKET
#define GNUTLS_E_ERROR_IN_FINISHED_PACKET -18
GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET
#define GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET -19
GNUTLS_E_UNKNOWN_CIPHER_SUITE
#define	GNUTLS_E_UNKNOWN_CIPHER_SUITE -21	/* GNUTLS_A_HANDSHAKE_FAILURE */
GNUTLS_E_UNWANTED_ALGORITHM
#define	GNUTLS_E_UNWANTED_ALGORITHM -22
GNUTLS_E_MPI_SCAN_FAILED
#define	GNUTLS_E_MPI_SCAN_FAILED -23
GNUTLS_E_DECRYPTION_FAILED
#define GNUTLS_E_DECRYPTION_FAILED -24	/* GNUTLS_A_DECRYPTION_FAILED, GNUTLS_A_BAD_RECORD_MAC */
GNUTLS_E_MEMORY_ERROR
#define GNUTLS_E_MEMORY_ERROR -25
GNUTLS_E_DECOMPRESSION_FAILED
#define GNUTLS_E_DECOMPRESSION_FAILED -26	/* GNUTLS_A_DECOMPRESSION_FAILURE */
GNUTLS_E_COMPRESSION_FAILED
#define GNUTLS_E_COMPRESSION_FAILED -27
GNUTLS_E_AGAIN
#define GNUTLS_E_AGAIN -28
GNUTLS_E_EXPIRED
#define GNUTLS_E_EXPIRED -29
GNUTLS_E_DB_ERROR
#define GNUTLS_E_DB_ERROR -30
GNUTLS_E_SRP_PWD_ERROR
#define GNUTLS_E_SRP_PWD_ERROR -31
GNUTLS_E_INSUFFICIENT_CREDENTIALS
#define GNUTLS_E_INSUFFICIENT_CREDENTIALS -32
GNUTLS_E_INSUFICIENT_CREDENTIALS
#define GNUTLS_E_INSUFICIENT_CREDENTIALS GNUTLS_E_INSUFFICIENT_CREDENTIALS	/* for backwards compatibility only */
GNUTLS_E_INSUFFICIENT_CRED
#define GNUTLS_E_INSUFFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS
GNUTLS_E_INSUFICIENT_CRED
#define GNUTLS_E_INSUFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS	/* for backwards compatibility only */
GNUTLS_E_HASH_FAILED
#define GNUTLS_E_HASH_FAILED -33
GNUTLS_E_BASE64_DECODING_ERROR
#define GNUTLS_E_BASE64_DECODING_ERROR -34
GNUTLS_E_MPI_PRINT_FAILED
#define	GNUTLS_E_MPI_PRINT_FAILED -35
GNUTLS_E_REHANDSHAKE
#define GNUTLS_E_REHANDSHAKE -37	/* GNUTLS_A_NO_RENEGOTIATION */
GNUTLS_E_GOT_APPLICATION_DATA
#define GNUTLS_E_GOT_APPLICATION_DATA -38
GNUTLS_E_RECORD_LIMIT_REACHED
#define GNUTLS_E_RECORD_LIMIT_REACHED -39
GNUTLS_E_ENCRYPTION_FAILED
#define GNUTLS_E_ENCRYPTION_FAILED -40
GNUTLS_E_PK_ENCRYPTION_FAILED
#define GNUTLS_E_PK_ENCRYPTION_FAILED -44
GNUTLS_E_PK_DECRYPTION_FAILED
#define GNUTLS_E_PK_DECRYPTION_FAILED -45
GNUTLS_E_PK_SIGN_FAILED
#define GNUTLS_E_PK_SIGN_FAILED -46
GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION
#define GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION -47
GNUTLS_E_KEY_USAGE_VIOLATION
#define GNUTLS_E_KEY_USAGE_VIOLATION -48
GNUTLS_E_NO_CERTIFICATE_FOUND
#define GNUTLS_E_NO_CERTIFICATE_FOUND -49	/* GNUTLS_A_BAD_CERTIFICATE */
GNUTLS_E_INVALID_REQUEST
#define GNUTLS_E_INVALID_REQUEST -50
GNUTLS_E_SHORT_MEMORY_BUFFER
#define GNUTLS_E_SHORT_MEMORY_BUFFER -51
GNUTLS_E_INTERRUPTED
#define GNUTLS_E_INTERRUPTED -52
GNUTLS_E_PUSH_ERROR
#define GNUTLS_E_PUSH_ERROR -53
GNUTLS_E_PULL_ERROR
#define GNUTLS_E_PULL_ERROR -54
GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER
#define GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER -55	/* GNUTLS_A_ILLEGAL_PARAMETER */
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE
#define GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE -56
GNUTLS_E_PKCS1_WRONG_PAD
#define GNUTLS_E_PKCS1_WRONG_PAD -57
GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION
#define GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION -58
GNUTLS_E_INTERNAL_ERROR
#define GNUTLS_E_INTERNAL_ERROR -59
GNUTLS_E_DH_PRIME_UNACCEPTABLE
#define GNUTLS_E_DH_PRIME_UNACCEPTABLE -63
GNUTLS_E_FILE_ERROR
#define GNUTLS_E_FILE_ERROR -64
GNUTLS_E_TOO_MANY_EMPTY_PACKETS
#define GNUTLS_E_TOO_MANY_EMPTY_PACKETS -78
GNUTLS_E_UNKNOWN_PK_ALGORITHM
#define GNUTLS_E_UNKNOWN_PK_ALGORITHM -80
GNUTLS_E_INIT_LIBEXTRA
#define GNUTLS_E_INIT_LIBEXTRA -82
GNUTLS_E_LIBRARY_VERSION_MISMATCH
#define GNUTLS_E_LIBRARY_VERSION_MISMATCH -83
GNUTLS_E_NO_TEMPORARY_RSA_PARAMS
#define GNUTLS_E_NO_TEMPORARY_RSA_PARAMS -84
GNUTLS_E_LZO_INIT_FAILED
#define GNUTLS_E_LZO_INIT_FAILED -85
GNUTLS_E_NO_COMPRESSION_ALGORITHMS
#define GNUTLS_E_NO_COMPRESSION_ALGORITHMS -86
GNUTLS_E_NO_CIPHER_SUITES
#define GNUTLS_E_NO_CIPHER_SUITES -87
GNUTLS_E_OPENPGP_GETKEY_FAILED
#define GNUTLS_E_OPENPGP_GETKEY_FAILED -88
GNUTLS_E_PK_SIG_VERIFY_FAILED
#define GNUTLS_E_PK_SIG_VERIFY_FAILED -89
GNUTLS_E_ILLEGAL_SRP_USERNAME
#define GNUTLS_E_ILLEGAL_SRP_USERNAME -90
GNUTLS_E_SRP_PWD_PARSING_ERROR
#define GNUTLS_E_SRP_PWD_PARSING_ERROR -91
GNUTLS_E_NO_TEMPORARY_DH_PARAMS
#define GNUTLS_E_NO_TEMPORARY_DH_PARAMS -93
GNUTLS_E_ASN1_ELEMENT_NOT_FOUND
#define GNUTLS_E_ASN1_ELEMENT_NOT_FOUND -67
GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND
#define GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND -68
GNUTLS_E_ASN1_DER_ERROR
#define GNUTLS_E_ASN1_DER_ERROR -69
GNUTLS_E_ASN1_VALUE_NOT_FOUND
#define GNUTLS_E_ASN1_VALUE_NOT_FOUND -70
GNUTLS_E_ASN1_GENERIC_ERROR
#define GNUTLS_E_ASN1_GENERIC_ERROR -71
GNUTLS_E_ASN1_VALUE_NOT_VALID
#define GNUTLS_E_ASN1_VALUE_NOT_VALID -72
GNUTLS_E_ASN1_TAG_ERROR
#define GNUTLS_E_ASN1_TAG_ERROR -73
GNUTLS_E_ASN1_TAG_IMPLICIT
#define GNUTLS_E_ASN1_TAG_IMPLICIT -74
GNUTLS_E_ASN1_TYPE_ANY_ERROR
#define GNUTLS_E_ASN1_TYPE_ANY_ERROR -75
GNUTLS_E_ASN1_SYNTAX_ERROR
#define GNUTLS_E_ASN1_SYNTAX_ERROR -76
GNUTLS_E_ASN1_DER_OVERFLOW
#define GNUTLS_E_ASN1_DER_OVERFLOW -77
GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED
#define GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED -81
GNUTLS_E_OPENPGP_UID_REVOKED
#define GNUTLS_E_OPENPGP_UID_REVOKED -79
GNUTLS_E_CERTIFICATE_ERROR
#define GNUTLS_E_CERTIFICATE_ERROR -43
GNUTLS_E_X509_CERTIFICATE_ERROR
#define GNUTLS_E_X509_CERTIFICATE_ERROR GNUTLS_E_CERTIFICATE_ERROR
GNUTLS_E_CERTIFICATE_KEY_MISMATCH
#define GNUTLS_E_CERTIFICATE_KEY_MISMATCH -60
GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE
#define GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE -61	/* GNUTLS_A_UNSUPPORTED_CERTIFICATE */
GNUTLS_E_X509_UNKNOWN_SAN
#define GNUTLS_E_X509_UNKNOWN_SAN -62
GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED
#define GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED -94
GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE
#define GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE -95
GNUTLS_E_UNKNOWN_HASH_ALGORITHM
#define GNUTLS_E_UNKNOWN_HASH_ALGORITHM -96
GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE
#define GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE -97
GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE
#define GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE -98
GNUTLS_E_INVALID_PASSWORD
#define GNUTLS_E_INVALID_PASSWORD -99
GNUTLS_E_MAC_VERIFY_FAILED
#define GNUTLS_E_MAC_VERIFY_FAILED -100	/* for PKCS #12 MAC */
GNUTLS_E_CONSTRAINT_ERROR
#define GNUTLS_E_CONSTRAINT_ERROR -101
GNUTLS_E_BASE64_ENCODING_ERROR
#define GNUTLS_E_BASE64_ENCODING_ERROR -201
GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY
#define GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY -202	/* obsolete */
GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY
#define GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY -202
GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY
#define GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY -203
GNUTLS_E_OPENPGP_KEYRING_ERROR
#define GNUTLS_E_OPENPGP_KEYRING_ERROR -204
GNUTLS_E_X509_UNSUPPORTED_OID
#define GNUTLS_E_X509_UNSUPPORTED_OID -205
GNUTLS_E_RANDOM_FAILED
#define GNUTLS_E_RANDOM_FAILED -206
GNUTLS_E_UNIMPLEMENTED_FEATURE
#define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250
ch01.html
<< GNU TLS API Reference Manual
gnutls-extra.html
extra >>
