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