1gnutls_pubkey_get_preferred_hash_aglnguogtrnliustt_hlpmsu(b3k)ey_get_preferred_hash_algorithm(3)
2
3
4
6 gnutls_pubkey_get_preferred_hash_algorithm - API function
7
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
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
27 This function will read the certifcate 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
37 the 0 if the hash algorithm is found. A negative error code is returned
38 on error.
39
41 2.12.0
42
44 Report bugs to <bugs@gnutls.org>.
45 Home page: http://www.gnutls.org
46
47
49 Copyright © 2001-2014 Free Software Foundation, Inc..
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
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 http://www.gnutls.org/manual/
60
61gnutls gnu3t.l3s._2p9ubkey_get_preferred_hash_algorithm(3)