1gnutls_pkcs7_sign(3)                gnutls                gnutls_pkcs7_sign(3)
2
3
4

NAME

6       gnutls_pkcs7_sign - API function
7

SYNOPSIS

9       #include <gnutls/pkcs7.h>
10
11       int  gnutls_pkcs7_sign(gnutls_pkcs7_t  pkcs7, gnutls_x509_crt_t signer,
12       gnutls_privkey_t   signer_key,    const    gnutls_datum_t    *    data,
13       gnutls_pkcs7_attrs_t signed_attrs, gnutls_pkcs7_attrs_t unsigned_attrs,
14       gnutls_digest_algorithm_t dig, unsigned flags);
15

ARGUMENTS

17       gnutls_pkcs7_t pkcs7
18                   should contain a gnutls_pkcs7_t type
19
20       gnutls_x509_crt_t signer
21                   the certificate to sign the structure
22
23       gnutls_privkey_t signer_key
24                   the key to sign the structure
25
26       const gnutls_datum_t * data
27                   The data to be signed or NULL if the data are  already  em‐
28                   bedded
29
30       gnutls_pkcs7_attrs_t signed_attrs
31                   Any additional attributes to be included in the signed ones
32                   (or NULL)
33
34       gnutls_pkcs7_attrs_t unsigned_attrs
35                   Any additional attributes to be included  in  the  unsigned
36                   ones (or NULL)
37
38       gnutls_digest_algorithm_t dig
39                   The digest algorithm to use for signing
40
41       unsigned flags
42                   Should be zero or one of GNUTLS_PKCS7 flags
43

DESCRIPTION

45       This function will add a signature in the provided PKCS 7 structure for
46       the provided data. Multiple signatures can be made with different sign‐
47       ers.
48
49       The  available  flags  are:  GNUTLS_PKCS7_EMBED_DATA,  GNUTLS_PKCS7_IN‐
50       CLUDE_TIME,  GNUTLS_PKCS7_INCLUDE_CERT,  and   GNUTLS_PKCS7_WRITE_SPKI.
51       They are explained in the gnutls_pkcs7_sign_flags definition.
52

RETURNS

54       On  success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative er‐
55       ror value.
56

SINCE

58       3.4.2
59

REPORTING BUGS

61       Report bugs to <bugs@gnutls.org>.
62       Home page: https://www.gnutls.org
63
64
66       Copyright © 2001- Free Software Foundation, Inc., and others.
67       Copying and distribution of this file, with  or  without  modification,
68       are  permitted in any medium without royalty provided the copyright no‐
69       tice and this notice are preserved.
70

SEE ALSO

72       The full documentation for gnutls is maintained as  a  Texinfo  manual.
73       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
74       visit
75
76       https://www.gnutls.org/manual/
77
78gnutls                               3.7.8                gnutls_pkcs7_sign(3)
Impressum