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/abstract.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 or one of gnutls_privkey_flags_t
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       You may use gnutls_pubkey_get_preferred_hash_algorithm()  to  determine
38       the hash algorithm.
39
40       Note  that  if GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA flag is specified this
41       function will ignore  hash_algo and perform a raw PKCS1 signature.
42

RETURNS

44       On success, GNUTLS_E_SUCCESS (0)  is  returned,  otherwise  a  negative
45       error value.
46

SINCE

48       2.12.0
49

REPORTING BUGS

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

SEE ALSO

62       The  full  documentation  for gnutls is maintained as a Texinfo manual.
63       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
64       visit
65
66       http://www.gnutls.org/manual/
67
68gnutls                              3.3.29         gnutls_privkey_sign_hash(3)
Impressum