1gnutls_x509_crq_privkey_sign(3) gnutls gnutls_x509_crq_privkey_sign(3)
2
3
4
6 gnutls_x509_crq_privkey_sign - API function
7
9 #include <gnutls/abstract.h>
10
11 int gnutls_x509_crq_privkey_sign(gnutls_x509_crq_t crq,
12 gnutls_privkey_t key, gnutls_digest_algorithm_t dig, unsigned int
13 flags);
14
16 gnutls_x509_crq_t crq
17 should contain a gnutls_x509_crq_t type
18
19 gnutls_privkey_t key
20 holds a private key
21
22 gnutls_digest_algorithm_t dig
23 The message digest to use, i.e., GNUTLS_DIG_SHA1
24
25 unsigned int flags
26 must be 0
27
29 This function will sign the certificate request with a private key.
30 This must be the same key as the one used in gnutls_x509_crt_set_key()
31 since a certificate request is self signed.
32
33 This must be the last step in a certificate request generation since
34 all the previously set parameters are now signed.
35
36 A known limitation of this function is, that a newly-signed request
37 will not be fully functional (e.g., for signature verification), until
38 it is exported an re-imported.
39
40 After GnuTLS 3.6.1 the value of dig may be GNUTLS_DIG_UNKNOWN, and in
41 that case, a suitable but reasonable for the key algorithm will be
42 selected.
43
45 GNUTLS_E_SUCCESS on success, otherwise a negative error code.
46 GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all infor‐
47 mation in the certificate request (e.g., the version using
48 gnutls_x509_crq_set_version()).
49
51 2.12.0
52
54 Report bugs to <bugs@gnutls.org>.
55 Home page: http://www.gnutls.org
56
57
59 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
60 Copying and distribution of this file, with or without modification,
61 are permitted in any medium without royalty provided the copyright
62 notice and this notice are preserved.
63
65 The full documentation for gnutls is maintained as a Texinfo manual.
66 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
67 visit
68
69 http://www.gnutls.org/manual/
70
71gnutls 3.6.5 gnutls_x509_crq_privkey_sign(3)