1gnutls_x509_privkey_sign_data(3) gnutls gnutls_x509_privkey_sign_data(3)
2
3
4
6 gnutls_x509_privkey_sign_data - This function will sign the given data
7 using the private key params
8
10 #include <gnutls/x509.h>
11
12 int gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t key,
13 gnutls_digest_algorithm_t digest, unsigned int flags, const
14 gnutls_datum_t * data, void * signature, size_t * signature_size);
15
17 gnutls_x509_privkey_t key
18 Holds the key
19
20 gnutls_digest_algorithm_t digest
21 should be MD5 or SHA1
22
23 unsigned int flags
24 should be 0 for now
25
26 const gnutls_datum_t * data
27 holds the data to be signed
28
29 void * signature
30 will contain the signature
31
32 size_t * signature_size
33 holds the size of signature (and will be replaced by the
34 new size)
35
37 This function will sign the given data using a signature algorithm sup‐
38 ported by the private key. Signature algorithms are always used
39 together with a hash functions. Different hash functions may be used
40 for the RSA algorithm, but only SHA-1 for the DSA keys.
41
42 If the buffer provided is not long enough to hold the output, then
43 *signature_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will be
44 returned.
45
46 In case of failure a negative value will be returned, and 0 on success.
47
49 Report bugs to <bug-gnutls@gnu.org>.
50
52 Copyright © 2006 Free Software Foundation.
53 Permission is granted to make and distribute verbatim copies of this
54 manual provided the copyright notice and this permission notice are
55 preserved on all copies.
56
58 The full documentation for gnutls is maintained as a Texinfo manual.
59 If the info and gnutls programs are properly installed at your site,
60 the command
61
62 info gnutls
63
64 should give you access to the complete manual.
65
66
67
68gnutls 1.6.3 gnutls_x509_privkey_sign_data(3)