Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_x509_privkey_sign_data.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_x509_privkey_sign_data" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_x509_privkey_sign_data \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/x509.h>
7 .sp
8 .BI "int gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t " key ", gnutls_digest_algorithm_t " digest ", unsigned int " flags ", const gnutls_datum_t * " data ", void * " signature ", size_t * " signature_size ");"
9 .SH ARGUMENTS
10 .IP "gnutls_x509_privkey_t key" 12
11 Holds the key
12 .IP "gnutls_digest_algorithm_t digest" 12
13 should be MD5 or SHA1
14 .IP "unsigned int flags" 12
15 should be 0 for now
16 .IP "const gnutls_datum_t * data" 12
17 holds the data to be signed
18 .IP "void * signature" 12
19 will contain the signature
20 .IP "size_t * signature_size" 12
21 holds the size of signature (and will be replaced
22 by the new size)
23 .SH "DESCRIPTION"
24 This function will sign the given data using a signature algorithm
25 supported by the private key. Signature algorithms are always used
26 together with a hash functions.  Different hash functions may be
27 used for the RSA algorithm, but only SHA\-1 for the DSA keys.
28
29 If the buffer provided is not long enough to hold the output, then
30 *\fIsignature_size\fP is updated and \fBGNUTLS_E_SHORT_MEMORY_BUFFER\fP will
31 be returned.
32
33 Use \fBgnutls_x509_crt_get_preferred_hash_algorithm()\fP to determine
34 the hash algorithm.
35 .SH "RETURNS"
36 On success, \fBGNUTLS_E_SUCCESS\fP is returned, otherwise a
37 negative error value.
38 .SH "DEPRECATED"
39 Use \fBgnutls_privkey_sign_data()\fP.
40 .SH "REPORTING BUGS"
41 Report bugs to <bug-gnutls@gnu.org>.
42 GnuTLS home page: http://www.gnu.org/software/gnutls/
43 General help using GNU software: http://www.gnu.org/gethelp/
44 .SH COPYRIGHT
45 Copyright \(co 2008 Free Software Foundation.
46 .br
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
50 .SH "SEE ALSO"
51 The full documentation for
52 .B gnutls
53 is maintained as a Texinfo manual.  If the
54 .B info
55 and
56 .B gnutls
57 programs are properly installed at your site, the command
58 .IP
59 .B info gnutls
60 .PP
61 should give you access to the complete manual.