The following functions are carried over from old GnuTLS released. They might be removed at a later version. Their prototypes lie in gnutls/compat.h.
Get the currently used compression algorithm.
Returns: the currently used compression method, a gnutls_compression_method_t value.
The names are compared in a case insensitive way.
Returns: an id of the specified in a string compression method, or GNUTLS_COMP_UNKNOWN on error.
Convert a gnutls_compression_method_t value to a string.
Returns: a pointer to a string that contains the name of the specified compression algorithm, or NULL .
Get a list of compression methods.
Returns: a zero-terminated list of gnutls_compression_method_t integers indicating the available compression methods.
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.
free_func: The function that frees allocated data. Must accept a NULL pointer.
This function must be called before gnutls_global_init() is called. This function is not thread safe.
pcache: is a gnutls_prioritity_t type.
Get a list of available compression method in the priority structure.
Returns: the number of methods, or an error code.
mand: If non-zero it means that the algorithm MUST use this hash. May be NULL .
Deprecated: Please use gnutls_pubkey_get_preferred_hash_algorithm() .
This function will sign the given hash using the private key. Do not use this function directly unless you know what it is. Typical signing requires the data to be hashed and stored in special formats (e.g. BER Digest-Info for RSA).
This API is provided only for backwards compatibility, and thus restricted to RSA, DSA and ECDSA key types. For other key types please use gnutls_privkey_sign_hash() and gnutls_privkey_sign_data() .