1gnutls_privkey_sign_hash(3)         gnutls         gnutls_privkey_sign_hash(3)
2
3
4

NAME

6       gnutls_privkey_sign_hash - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int          gnutls_privkey_sign_hash(gnutls_privkey_t          signer,
12       gnutls_digest_algorithm_t  hash_algo,   unsigned   int   flags,   const
13       gnutls_datum_t * hash_data, gnutls_datum_t * signature);
14

ARGUMENTS

16       gnutls_privkey_t signer
17                   Holds the signer's key
18
19       gnutls_digest_algorithm_t hash_algo
20                   The hash algorithm used
21
22       unsigned int flags
23                   zero for now
24
25       const gnutls_datum_t * hash_data
26                   holds the data to be signed
27
28       gnutls_datum_t * signature
29                   will contain newly allocated signature
30

DESCRIPTION

32       This  function  will sign the given hashed data using a signature algo‐
33       rithm supported by the private key.  Signature  algorithms  are  always
34       used  together  with a hash functions.  Different hash functions may be
35       used for the RSA algorithm, but only SHA-XXX for the DSA keys.
36
37       Use  gnutls_x509_crt_get_preferred_hash_algorithm()  to  determine  the
38       hash algorithm.
39

RETURNS

41       On  success,  GNUTLS_E_SUCCESS  is returned, otherwise a negative error
42       value.
43

SINCE

45       2.12.0
46

REPORTING BUGS

48       Report   bugs   to    <bug-gnutls@gnu.org>.     GnuTLS    home    page:
49       http://www.gnu.org/software/gnutls/  General  help  using GNU software:
50       http://www.gnu.org/gethelp/
51
53       Copyright © 2008 Free Software Foundation.
54       Copying and distribution of this file, with  or  without  modification,
55       are  permitted  in  any  medium  without royalty provided the copyright
56       notice and this notice are preserved.
57

SEE ALSO

59       The full documentation for gnutls is maintained as  a  Texinfo  manual.
60       If  the  info  and gnutls programs are properly installed at your site,
61       the command
62
63              info gnutls
64
65       should give you access to the complete manual.
66
67
68
69gnutls                             2.12.6.1        gnutls_privkey_sign_hash(3)
Impressum