diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:33:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:33:12 +0000 |
commit | 36082a2fe36ecd800d784ae44c14f1f18c66a7e9 (patch) | |
tree | 6c68e0c0097987aff85a01dabddd34b862309a7c /doc/compat-api.texi | |
parent | Initial commit. (diff) | |
download | gnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.tar.xz gnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.zip |
Adding upstream version 3.7.9.upstream/3.7.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/compat-api.texi')
-rw-r--r-- | doc/compat-api.texi | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/doc/compat-api.texi b/doc/compat-api.texi new file mode 100644 index 0000000..e0b8f28 --- /dev/null +++ b/doc/compat-api.texi @@ -0,0 +1,145 @@ + +@subheading gnutls_compression_get +@anchor{gnutls_compression_get} +@deftypefun {gnutls_compression_method_t} {gnutls_compression_get} (gnutls_session_t @var{session}) +@var{session}: is a @code{gnutls_session_t} type. + +Get the currently used compression algorithm. + +@strong{Returns:} the currently used compression method, a +@code{gnutls_compression_method_t} value. +@end deftypefun + +@subheading gnutls_compression_get_id +@anchor{gnutls_compression_get_id} +@deftypefun {gnutls_compression_method_t} {gnutls_compression_get_id} (const char * @var{name}) +@var{name}: is a compression method name + +The names are compared in a case insensitive way. + +@strong{Returns:} an id of the specified in a string compression method, or +@code{GNUTLS_COMP_UNKNOWN} on error. +@end deftypefun + +@subheading gnutls_compression_get_name +@anchor{gnutls_compression_get_name} +@deftypefun {const char *} {gnutls_compression_get_name} (gnutls_compression_method_t @var{algorithm}) +@var{algorithm}: is a Compression algorithm + +Convert a @code{gnutls_compression_method_t} value to a string. + +@strong{Returns:} a pointer to a string that contains the name of the +specified compression algorithm, or @code{NULL} . +@end deftypefun + +@subheading gnutls_compression_list +@anchor{gnutls_compression_list} +@deftypefun {const gnutls_compression_method_t *} {gnutls_compression_list} ( @var{void}) + +Get a list of compression methods. + +@strong{Returns:} a zero-terminated list of @code{gnutls_compression_method_t} +integers indicating the available compression methods. +@end deftypefun + +@subheading gnutls_global_set_mem_functions +@anchor{gnutls_global_set_mem_functions} +@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}) +@var{alloc_func}: it's the default memory allocation function. Like @code{malloc()} . + +@var{secure_alloc_func}: This is the memory allocation function that will be used for sensitive data. + +@var{is_secure_func}: a function that returns 0 if the memory given is not secure. May be NULL. + +@var{realloc_func}: A realloc function + +@var{free_func}: The function that frees allocated data. Must accept a NULL pointer. + + +@strong{Deprecated:} 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 +(@code{malloc()} , @code{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 @code{gnutls_global_init()} is called. +This function is not thread safe. +@end deftypefun + +@subheading gnutls_openpgp_privkey_sign_hash +@anchor{gnutls_openpgp_privkey_sign_hash} +@deftypefun {int} {gnutls_openpgp_privkey_sign_hash} (gnutls_openpgp_privkey_t @var{key}, const gnutls_datum_t * @var{hash}, gnutls_datum_t * @var{signature}) +@var{key}: Holds the key + +@var{hash}: holds the data to be signed + +@var{signature}: will contain newly allocated signature + +This function is no-op. + +@strong{Returns:} @code{GNUTLS_E_UNIMPLEMENTED_FEATURE} . +@end deftypefun + +@subheading gnutls_priority_compression_list +@anchor{gnutls_priority_compression_list} +@deftypefun {int} {gnutls_priority_compression_list} (gnutls_priority_t @var{pcache}, const unsigned int ** @var{list}) +@var{pcache}: is a @code{gnutls_priority_t} type. + +@var{list}: will point to an integer list + +Get a list of available compression method in the priority +structure. + +@strong{Returns:} the number of methods, or an error code. + +@strong{Since:} 3.0 +@end deftypefun + +@subheading gnutls_x509_crt_get_preferred_hash_algorithm +@anchor{gnutls_x509_crt_get_preferred_hash_algorithm} +@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}) +@var{crt}: Holds the certificate + +@var{hash}: The result of the call with the hash algorithm used for signature + +@var{mand}: If non-zero it means that the algorithm MUST use this hash. May be @code{NULL} . + +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). + +@strong{Deprecated:} Please use @code{gnutls_pubkey_get_preferred_hash_algorithm()} . + +@strong{Returns:} the 0 if the hash algorithm is found. A negative error code is +returned on error. + +@strong{Since:} 2.12.0 +@end deftypefun + +@subheading gnutls_x509_privkey_sign_hash +@anchor{gnutls_x509_privkey_sign_hash} +@deftypefun {int} {gnutls_x509_privkey_sign_hash} (gnutls_x509_privkey_t @var{key}, const gnutls_datum_t * @var{hash}, gnutls_datum_t * @var{signature}) +@var{key}: a key + +@var{hash}: holds the data to be signed + +@var{signature}: will contain newly allocated signature + +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 @code{gnutls_privkey_sign_hash()} and @code{gnutls_privkey_sign_data()} . + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. + +Deprecated in: 2.12.0 +@end deftypefun + |