1gnutls_x509_crq_sign2(3)            gnutls            gnutls_x509_crq_sign2(3)
2
3
4

NAME

6       gnutls_x509_crq_sign2 - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int  gnutls_x509_crq_sign2(gnutls_x509_crq_t crq, gnutls_x509_privkey_t
12       key, gnutls_digest_algorithm_t dig, unsigned int flags);
13

ARGUMENTS

15       gnutls_x509_crq_t crq
16                   should contain a gnutls_x509_crq_t type
17
18       gnutls_x509_privkey_t key
19                   holds a private key
20
21       gnutls_digest_algorithm_t dig
22                   The message digest to use, i.e., GNUTLS_DIG_SHA256
23
24       unsigned int flags
25                   must be 0
26

DESCRIPTION

28       This function will sign the certificate request  with  a  private  key.
29       This  must be the same key as the one used in gnutls_x509_crt_set_key()
30       since a certificate request is self signed.
31
32       This must be the last step in a certificate  request  generation  since
33       all the previously set parameters are now signed.
34
35       A  known  limitation  of  this function is, that a newly-signed request
36       will not be fully functional (e.g., for signature verification),  until
37       it is exported an re-imported.
38
39       After  GnuTLS 3.6.1 the value of  dig may be GNUTLS_DIG_UNKNOWN, and in
40       that case, a suitable but reasonable for  the  key  algorithm  will  be
41       selected.
42

RETURNS

44       GNUTLS_E_SUCCESS   on   success,   otherwise  a  negative  error  code.
45       GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all  infor‐
46       mation   in   the   certificate   request   (e.g.,  the  version  using
47       gnutls_x509_crq_set_version()).
48

REPORTING BUGS

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

SEE ALSO

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