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                   a key
18
19       gnutls_digest_algorithm_t digest
20                   should be a digest algorithm
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 (0)  is  returned,  otherwise  a  negative
50       error value.
51

REPORTING BUGS

53       Report bugs to <bugs@gnutls.org>.
54       Home page: https://www.gnutls.org
55
56
58       Copyright © 2001-2019 Free Software Foundation, Inc., and others.
59       Copying  and  distribution  of this file, with or without modification,
60       are permitted in any medium  without  royalty  provided  the  copyright
61       notice and this notice are preserved.
62

SEE ALSO

64       The  full  documentation  for gnutls is maintained as a Texinfo manual.
65       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
66       visit
67
68       https://www.gnutls.org/manual/
69
70gnutls                              3.6.11    gnutls_x509_privkey_sign_data(3)
Impressum