1gnutls_privkey_sign_hash2(3)        gnutls        gnutls_privkey_sign_hash2(3)
2
3
4

NAME

6       gnutls_privkey_sign_hash2 - API function
7

SYNOPSIS

9       #include <gnutls/abstract.h>
10
11       int  gnutls_privkey_sign_hash2(gnutls_privkey_t signer, gnutls_sign_al‐
12       gorithm_t algo, unsigned int flags, const gnutls_datum_t  *  hash_data,
13       gnutls_datum_t * signature);
14

ARGUMENTS

16       gnutls_privkey_t signer
17                   Holds the signer's key
18
19       gnutls_sign_algorithm_t algo
20                   The signature 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 the specified sig‐
33       nature   algorithm.   This    function    is    an    enhancement    of
34       gnutls_privkey_sign_hash(), as it allows utilizing a alternative signa‐
35       ture algorithm where possible (e.g, use an RSA key with RSA-PSS).
36
37       The flags may be GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA.  In that case  this
38       function  will  ignore   hash_algo  and  perform a raw PKCS1 signature.
39       Note that this flag is supported since 3.6.9.
40
41       Note also that, not all algorithm support signing already hashed  data.
42       When  signing  with Ed25519, gnutls_privkey_sign_data2() should be used
43       instead.
44

RETURNS

46       On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative  er‐
47       ror value.
48

SINCE

50       3.6.0
51

REPORTING BUGS

53       Report bugs to <bugs@gnutls.org>.
54       Home page: https://www.gnutls.org
55
56
58       Copyright © 2001- 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  no‐
61       tice 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.7.8        gnutls_privkey_sign_hash2(3)
Impressum