1gnutls_pubkey_get_preferred_hash_aglnguogtrnliustt_hlpmsu(b3k)ey_get_preferred_hash_algorithm(3)
2
3
4

NAME

6       gnutls_pubkey_get_preferred_hash_algorithm - API function
7

SYNOPSIS

9       #include <gnutls/abstract.h>
10
11       int   gnutls_pubkey_get_preferred_hash_algorithm(gnutls_pubkey_t   key,
12       gnutls_digest_algorithm_t *         hash, unsigned int * mand);
13

ARGUMENTS

15       gnutls_pubkey_t key
16                   Holds the certificate
17
18       gnutls_digest_algorithm_t *         hash
19                   The result of the call with the  hash  algorithm  used  for
20                   signature
21
22       unsigned int * mand
23                   If non zero it means that the algorithm MUST use this hash.
24                   May be NULL.
25

DESCRIPTION

27       This function will read the  certificate  and  return  the  appropriate
28       digest  algorithm  to  use for signing with this certificate. Some cer‐
29       tificates (i.e.  DSA might not be able to sign  without  the  preferred
30       algorithm).
31
32       To   get   the  signature  algorithm  instead  of  just  the  hash  use
33       gnutls_pk_to_sign() with the algorithm of the certificate/key  and  the
34       provided  hash .
35

RETURNS

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

SINCE

41       2.12.0
42

REPORTING BUGS

44       Report bugs to <bugs@gnutls.org>.
45       Home page: https://www.gnutls.org
46
47
49       Copyright © 2001-2019 Free Software Foundation, Inc., and others.
50       Copying and distribution of this file, with  or  without  modification,
51       are  permitted  in  any  medium  without royalty provided the copyright
52       notice and this notice are preserved.
53

SEE ALSO

55       The full documentation for gnutls is maintained as  a  Texinfo  manual.
56       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
57       visit
58
59       https://www.gnutls.org/manual/
60
61gnutls                           gnu3t.l6s._1p1ubkey_get_preferred_hash_algorithm(3)
Impressum