1gnutls_x509_privkey_sign_data(3)    gnutls    gnutls_x509_privkey_sign_data(3)
2
3
4

NAME

6       gnutls_x509_privkey_sign_data - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int       gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t      key,
12       gnutls_digest_algorithm_t   digest,   unsigned   int    flags,    const
13       gnutls_datum_t * data, void * signature, size_t * signature_size);
14

ARGUMENTS

16       gnutls_x509_privkey_t key
17                   Holds the key
18
19       gnutls_digest_algorithm_t digest
20                   should be MD5 or SHA1
21
22       unsigned int flags
23                   should be 0 for now
24
25       const gnutls_datum_t * data
26                   holds the data to be signed
27
28       void * signature
29                   will contain the signature
30
31       size_t * signature_size
32                   holds  the  size  of signature (and will be replaced by the
33                   new size)
34

DESCRIPTION

36       This function will sign the given data using a signature algorithm sup‐
37       ported  by  the  private  key.  Signature  algorithms  are  always used
38       together with a hash functions.  Different hash functions may  be  used
39       for the RSA algorithm, but only SHA-1 for the DSA keys.
40
41       If  the  buffer  provided  is  not long enough to hold the output, then
42       *signature_size is updated  and  GNUTLS_E_SHORT_MEMORY_BUFFER  will  be
43       returned.
44
45       Use  gnutls_x509_crt_get_preferred_hash_algorithm()  to  determine  the
46       hash algorithm.
47

RETURNS

49       On success, GNUTLS_E_SUCCESS is returned, otherwise  a  negative  error
50       value.
51

DEPRECATED

53       Use gnutls_privkey_sign_data().
54

REPORTING BUGS

56       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
57       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
58       http://www.gnu.org/gethelp/
59
61       Copyright © 2008 Free Software Foundation.
62       Copying  and  distribution  of this file, with or without modification,
63       are permitted in any medium  without  royalty  provided  the  copyright
64       notice and this notice are preserved.
65

SEE ALSO

67       The  full  documentation  for gnutls is maintained as a Texinfo manual.
68       If the info and gnutls programs are properly installed  at  your  site,
69       the command
70
71              info gnutls
72
73       should give you access to the complete manual.
74
75
76
77gnutls                             2.12.6.1   gnutls_x509_privkey_sign_data(3)
Impressum