compat

compat

Functions

Types and Values

Description

Functions

gnutls_x509_privkey_sign_hash ()

int
gnutls_x509_privkey_sign_hash (gnutls_x509_privkey_t key,
                               const gnutls_datum_t *hash,
                               gnutls_datum_t *signature);

gnutls_x509_privkey_sign_hash is deprecated and should not be used in newly-written code.

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().

Parameters

key

a key

 

hash

holds the data to be signed

 

signature

will contain newly allocated signature

 

Returns

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.

Deprecated in: 2.12.0


gnutls_openpgp_privkey_sign_hash ()

int
gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key,
                                  const gnutls_datum_t *hash,
                                  gnutls_datum_t *signature);

gnutls_openpgp_privkey_sign_hash is deprecated and should not be used in newly-written code.

This function is no-op.

Parameters

key

Holds the key

 

hash

holds the data to be signed

 

signature

will contain newly allocated signature

 

gnutls_x509_crt_get_preferred_hash_algorithm ()

int
gnutls_x509_crt_get_preferred_hash_algorithm
                               (gnutls_x509_crt_t crt,
                                gnutls_digest_algorithm_t *hash,
                                unsigned int *mand);

gnutls_x509_crt_get_preferred_hash_algorithm is deprecated and should not be used in newly-written code.

Please use gnutls_pubkey_get_preferred_hash_algorithm().

This function will read the certificate and return the appropriate digest algorithm to use for signing with this certificate. Some certificates (i.e. DSA might not be able to sign without the preferred algorithm).

Parameters

crt

Holds the certificate

 

hash

The result of the call with the hash algorithm used for signature

 

mand

If non-zero it means that the algorithm MUST use this hash. May be NULL.

 

Returns

the 0 if the hash algorithm is found. A negative error code is returned on error.

Since: 2.12.0


gnutls_global_set_mem_functions ()

void
gnutls_global_set_mem_functions (gnutls_alloc_function alloc_func,
                                 gnutls_alloc_function secure_alloc_func,
                                 gnutls_is_secure_function is_secure_func,
                                 gnutls_realloc_function realloc_func,
                                 gnutls_free_function free_func);

gnutls_global_set_mem_functions is deprecated and should not be used in newly-written code.

since 3.3.0 it is no longer possible to replace the internally used memory allocation functions

This is the function where 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

This function must be called before gnutls_global_init() is called. This function is not thread safe.

Parameters

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_compression_get ()

gnutls_compression_method_t
gnutls_compression_get (gnutls_session_t session);

gnutls_compression_get is deprecated and should not be used in newly-written code.

Get the currently used compression algorithm.

Parameters

session

is a gnutls_session_t type.

 

Returns

the currently used compression method, a gnutls_compression_method_t value.


gnutls_compression_get_name ()

const char *
gnutls_compression_get_name (gnutls_compression_method_t algorithm);

gnutls_compression_get_name is deprecated and should not be used in newly-written code.

Convert a gnutls_compression_method_t value to a string.

Parameters

algorithm

is a Compression algorithm

 

Returns

a pointer to a string that contains the name of the specified compression algorithm, or NULL.


gnutls_compression_get_id ()

gnutls_compression_method_t
gnutls_compression_get_id (const char *name);

gnutls_compression_get_id is deprecated and should not be used in newly-written code.

The names are compared in a case insensitive way.

Parameters

name

is a compression method name

 

Returns

an id of the specified in a string compression method, or GNUTLS_COMP_UNKNOWN on error.


gnutls_compression_list ()

const gnutls_compression_method_t *
gnutls_compression_list (void);

gnutls_compression_list is deprecated and should not be used in newly-written code.

Get a list of compression methods.

Returns

a zero-terminated list of gnutls_compression_method_t integers indicating the available compression methods.


gnutls_priority_compression_list ()

int
gnutls_priority_compression_list (gnutls_priority_t pcache,
                                  const unsigned int **list);

gnutls_priority_compression_list is deprecated and should not be used in newly-written code.

Get a list of available compression method in the priority structure.

Parameters

pcache

is a gnutls_priority_t type.

 

list

will point to an integer list

 

Returns

the number of methods, or an error code.

Since: 3.0

Types and Values

_GNUTLS_GCC_ATTR_DEPRECATED

typedef unsigned int gnutls_connection_end_t _GNUTLS_GCC_ATTR_DEPRECATED;

_GNUTLS_GCC_ATTR_DEPRECATED is deprecated and should not be used in newly-written code.


GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT

#define GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT  (0)

GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT is deprecated and should not be used in newly-written code.


GNUTLS_A_MISSING_SRP_USERNAME

#define GNUTLS_A_MISSING_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY

GNUTLS_A_UNKNOWN_SRP_USERNAME

#define GNUTLS_A_UNKNOWN_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY

GNUTLS_OPENPGP_KEY

#define GNUTLS_OPENPGP_KEY GNUTLS_OPENPGP_CERT

GNUTLS_OPENPGP_KEY_FINGERPRINT

#define GNUTLS_OPENPGP_KEY_FINGERPRINT GNUTLS_OPENPGP_CERT_FINGERPRINT

gnutls_openpgp_send_key

#define gnutls_openpgp_send_key gnutls_openpgp_send_cert

gnutls_openpgp_key_init

#define gnutls_openpgp_key_init gnutls_openpgp_crt_init

gnutls_openpgp_key_init is deprecated and should not be used in newly-written code.


gnutls_openpgp_key_deinit

#define gnutls_openpgp_key_deinit gnutls_openpgp_crt_deinit

gnutls_openpgp_key_import

#define gnutls_openpgp_key_import gnutls_openpgp_crt_import

gnutls_openpgp_key_export

#define gnutls_openpgp_key_export gnutls_openpgp_crt_export

gnutls_openpgp_key_get_key_usage

#define gnutls_openpgp_key_get_key_usage gnutls_openpgp_crt_get_key_usage

gnutls_openpgp_key_get_fingerprint

#define gnutls_openpgp_key_get_fingerprint gnutls_openpgp_crt_get_fingerprint

gnutls_openpgp_key_get_pk_algorithm

#define gnutls_openpgp_key_get_pk_algorithm gnutls_openpgp_crt_get_pk_algorithm

gnutls_openpgp_key_get_name

#define gnutls_openpgp_key_get_name gnutls_openpgp_crt_get_name

gnutls_openpgp_key_get_version

#define gnutls_openpgp_key_get_version gnutls_openpgp_crt_get_version

gnutls_openpgp_key_get_creation_time

#define gnutls_openpgp_key_get_creation_time gnutls_openpgp_crt_get_creation_time

gnutls_openpgp_key_get_expiration_time

#define gnutls_openpgp_key_get_expiration_time gnutls_openpgp_crt_get_expiration_time

gnutls_openpgp_key_get_id

#define gnutls_openpgp_key_get_id gnutls_openpgp_crt_get_id

gnutls_openpgp_key_check_hostname

#define gnutls_openpgp_key_check_hostname gnutls_openpgp_crt_check_hostname

gnutls_openpgp_crt_get_id

#define gnutls_openpgp_crt_get_id gnutls_openpgp_crt_get_key_id

GNUTLS_X509_CRT_FULL

#define GNUTLS_X509_CRT_FULL GNUTLS_CRT_PRINT_FULL

GNUTLS_X509_CRT_ONELINE

#define GNUTLS_X509_CRT_ONELINE GNUTLS_CRT_PRINT_ONELINE

GNUTLS_X509_CRT_UNSIGNED_FULL

#define GNUTLS_X509_CRT_UNSIGNED_FULL GNUTLS_CRT_PRINT_UNSIGNED_FULL

LIBGNUTLS_VERSION

#define LIBGNUTLS_VERSION GNUTLS_VERSION

LIBGNUTLS_VERSION_MAJOR

#define LIBGNUTLS_VERSION_MAJOR GNUTLS_VERSION_MAJOR

LIBGNUTLS_VERSION_MINOR

#define LIBGNUTLS_VERSION_MINOR GNUTLS_VERSION_MINOR

LIBGNUTLS_VERSION_PATCH

#define LIBGNUTLS_VERSION_PATCH GNUTLS_VERSION_PATCH

LIBGNUTLS_VERSION_NUMBER

#define LIBGNUTLS_VERSION_NUMBER GNUTLS_VERSION_NUMBER

LIBGNUTLS_EXTRA_VERSION

#define LIBGNUTLS_EXTRA_VERSION GNUTLS_VERSION

GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA

#define GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA 0