1gnutls_certificate_set_x509_key(3)  gnutls  gnutls_certificate_set_x509_key(3)
2
3
4

NAME

6       gnutls_certificate_set_x509_key - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int    gnutls_certificate_set_x509_key(gnutls_certificate_credentials_t
12       res,    gnutls_x509_crt_t    *    cert_list,    int     cert_list_size,
13       gnutls_x509_privkey_t key);
14

ARGUMENTS

16       gnutls_certificate_credentials_t res
17                   is a gnutls_certificate_credentials_t type.
18
19       gnutls_x509_crt_t * cert_list
20                   contains  a  certificate list (path) for the specified pri‐
21                   vate key
22
23       int cert_list_size
24                   holds the size of the certificate list
25
26       gnutls_x509_privkey_t key
27                   is a gnutls_x509_privkey_t key
28

DESCRIPTION

30       This function sets a certificate/private key pair  in  the  gnutls_cer‐
31       tificate_credentials_t  type.   This  function  may be called more than
32       once, in case multiple keys/certificates exist  for  the  server.   For
33       clients  that  wants to send more than their own end entity certificate
34       (e.g., also an intermediate CA cert) then put the certificate chain  in
35       cert_list .
36
37       Note  that the certificates and keys provided, can be safely deinitial‐
38       ized after this function is called.
39
40       If that function fails to load the  res type is at an undefined  state,
41       it must not be reused to load other keys or certificates.
42
43       Note that, this function by default returns zero on success and a nega‐
44       tive value on  error.   Since  3.5.6,  when  the  flag  GNUTLS_CERTIFI‐
45       CATE_API_V2  is  set using gnutls_certificate_set_flags() it returns an
46       index (greater or equal to zero). That index can be used to other func‐
47       tions to refer to the added key-pair.
48

RETURNS

50       On  success this functions returns zero, and otherwise a negative value
51       on error (see above for modifying that behavior).
52

SINCE

54       2.4.0
55

REPORTING BUGS

57       Report bugs to <bugs@gnutls.org>.
58       Home page: https://www.gnutls.org
59
60
62       Copyright © 2001-2019 Free Software Foundation, Inc., and others.
63       Copying and distribution of this file, with  or  without  modification,
64       are  permitted  in  any  medium  without royalty provided the copyright
65       notice and this notice are preserved.
66

SEE ALSO

68       The full documentation for gnutls is maintained as  a  Texinfo  manual.
69       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
70       visit
71
72       https://www.gnutls.org/manual/
73
74gnutls                               3.6.8  gnutls_certificate_set_x509_key(3)
Impressum