Blame doc/compat-api.texi

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