Blame doc/compat-api.texi

Packit aea12f
Packit aea12f
@subheading gnutls_compression_get
Packit aea12f
@anchor{gnutls_compression_get}
Packit aea12f
@deftypefun {gnutls_compression_method_t} {gnutls_compression_get} (gnutls_session_t @var{session})
Packit aea12f
@var{session}: is a @code{gnutls_session_t}  type.
Packit aea12f
Packit aea12f
Get the currently used compression algorithm.
Packit aea12f
Packit aea12f
@strong{Returns:} the currently used compression method, a
Packit aea12f
@code{gnutls_compression_method_t}  value.
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_compression_get_id
Packit aea12f
@anchor{gnutls_compression_get_id}
Packit aea12f
@deftypefun {gnutls_compression_method_t} {gnutls_compression_get_id} (const char * @var{name})
Packit aea12f
@var{name}: is a compression method name
Packit aea12f
Packit aea12f
The names are compared in a case insensitive way.
Packit aea12f
Packit aea12f
@strong{Returns:} an id of the specified in a string compression method, or
Packit aea12f
@code{GNUTLS_COMP_UNKNOWN}  on error.
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_compression_get_name
Packit aea12f
@anchor{gnutls_compression_get_name}
Packit aea12f
@deftypefun {const char *} {gnutls_compression_get_name} (gnutls_compression_method_t      @var{algorithm})
Packit aea12f
@var{algorithm}: is a Compression algorithm
Packit aea12f
Packit aea12f
Convert a @code{gnutls_compression_method_t}  value to a string.
Packit aea12f
Packit aea12f
@strong{Returns:} a pointer to a string that contains the name of the
Packit aea12f
specified compression algorithm, or @code{NULL} .
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_compression_list
Packit aea12f
@anchor{gnutls_compression_list}
Packit aea12f
@deftypefun {const gnutls_compression_method_t *} {gnutls_compression_list} ( @var{void})
Packit aea12f
Packit aea12f
Get a list of compression methods.
Packit aea12f
Packit aea12f
@strong{Returns:} a zero-terminated list of @code{gnutls_compression_method_t} 
Packit aea12f
integers indicating the available compression methods.
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_global_set_mem_functions
Packit aea12f
@anchor{gnutls_global_set_mem_functions}
Packit aea12f
@deftypefun {void} {gnutls_global_set_mem_functions} (gnutls_alloc_function @var{alloc_func}, gnutls_alloc_function @var{secure_alloc_func}, gnutls_is_secure_function @var{is_secure_func}, gnutls_realloc_function @var{realloc_func}, gnutls_free_function @var{free_func})
Packit aea12f
@var{alloc_func}: it's the default memory allocation function. Like @code{malloc()} .
Packit aea12f
Packit aea12f
@var{secure_alloc_func}: This is the memory allocation function that will be used for sensitive data.
Packit aea12f
Packit aea12f
@var{is_secure_func}: a function that returns 0 if the memory given is not secure. May be NULL.
Packit aea12f
Packit aea12f
@var{realloc_func}: A realloc function
Packit aea12f
Packit aea12f
@var{free_func}: The function that frees allocated data. Must accept a NULL pointer.
Packit aea12f
Packit aea12f
Packit aea12f
@strong{Deprecated:} since 3.3.0 it is no longer possible to replace the internally used 
Packit aea12f
memory allocation functions
Packit aea12f
Packit aea12f
This is the function where you set the memory allocation functions
Packit aea12f
gnutls is going to use. By default the libc's allocation functions
Packit aea12f
(@code{malloc()} , @code{free()} ), are used by gnutls, to allocate both sensitive
Packit aea12f
and not sensitive data.  This function is provided to set the
Packit aea12f
memory allocation functions to something other than the defaults
Packit aea12f
Packit aea12f
This function must be called before @code{gnutls_global_init()}  is called.
Packit aea12f
This function is not thread safe.
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_openpgp_privkey_sign_hash
Packit aea12f
@anchor{gnutls_openpgp_privkey_sign_hash}
Packit aea12f
@deftypefun {int} {gnutls_openpgp_privkey_sign_hash} (gnutls_openpgp_privkey_t @var{key}, const gnutls_datum_t * @var{hash}, gnutls_datum_t * @var{signature})
Packit aea12f
@var{key}: Holds the key
Packit aea12f
Packit aea12f
@var{hash}: holds the data to be signed
Packit aea12f
Packit aea12f
@var{signature}: will contain newly allocated signature
Packit aea12f
Packit aea12f
This function is no-op.
Packit aea12f
Packit aea12f
@strong{Returns:} @code{GNUTLS_E_UNIMPLEMENTED_FEATURE} .
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_priority_compression_list
Packit aea12f
@anchor{gnutls_priority_compression_list}
Packit aea12f
@deftypefun {int} {gnutls_priority_compression_list} (gnutls_priority_t @var{pcache}, const unsigned int ** @var{list})
Packit aea12f
@var{pcache}: is a @code{gnutls_prioritity_t}  type.
Packit aea12f
Packit aea12f
@var{list}: will point to an integer list
Packit aea12f
Packit aea12f
Get a list of available compression method in the priority
Packit aea12f
structure.
Packit aea12f
Packit aea12f
@strong{Returns:} the number of methods, or an error code.
Packit aea12f
Packit aea12f
@strong{Since:} 3.0
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_x509_crt_get_preferred_hash_algorithm
Packit aea12f
@anchor{gnutls_x509_crt_get_preferred_hash_algorithm}
Packit aea12f
@deftypefun {int} {gnutls_x509_crt_get_preferred_hash_algorithm} (gnutls_x509_crt_t @var{crt}, gnutls_digest_algorithm_t *           @var{hash}, unsigned int * @var{mand})
Packit aea12f
@var{crt}: Holds the certificate
Packit aea12f
Packit aea12f
@var{hash}: The result of the call with the hash algorithm used for signature
Packit aea12f
Packit aea12f
@var{mand}: If non-zero it means that the algorithm MUST use this hash. May be @code{NULL} .
Packit aea12f
Packit aea12f
This function will read the certificate and return the appropriate digest
Packit aea12f
algorithm to use for signing with this certificate. Some certificates (i.e.
Packit aea12f
DSA might not be able to sign without the preferred algorithm).
Packit aea12f
Packit aea12f
@strong{Deprecated:} Please use @code{gnutls_pubkey_get_preferred_hash_algorithm()} .
Packit aea12f
Packit aea12f
@strong{Returns:} the 0 if the hash algorithm is found. A negative error code is
Packit aea12f
returned on error.
Packit aea12f
Packit aea12f
@strong{Since:} 2.12.0
Packit aea12f
@end deftypefun
Packit aea12f
Packit aea12f
@subheading gnutls_x509_privkey_sign_hash
Packit aea12f
@anchor{gnutls_x509_privkey_sign_hash}
Packit aea12f
@deftypefun {int} {gnutls_x509_privkey_sign_hash} (gnutls_x509_privkey_t @var{key}, const gnutls_datum_t * @var{hash}, gnutls_datum_t * @var{signature})
Packit aea12f
@var{key}: a key
Packit aea12f
Packit aea12f
@var{hash}: holds the data to be signed
Packit aea12f
Packit aea12f
@var{signature}: will contain newly allocated signature
Packit aea12f
Packit aea12f
This function will sign the given hash using the private key. Do not
Packit aea12f
use this function directly unless you know what it is. Typical signing
Packit aea12f
requires the data to be hashed and stored in special formats 
Packit aea12f
(e.g. BER Digest-Info for RSA).
Packit aea12f
Packit aea12f
This API is provided only for backwards compatibility, and thus
Packit aea12f
restricted to RSA, DSA and ECDSA key types. For other key types please
Packit aea12f
use @code{gnutls_privkey_sign_hash()}  and @code{gnutls_privkey_sign_data()} .
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit aea12f
negative error value.
Packit aea12f
Packit aea12f
Deprecated in: 2.12.0
Packit aea12f
@end deftypefun
Packit aea12f