1gnutls_certificate_set_x509_key_file(g3n)utglnsutls_certificate_set_x509_key_file(3)
2
3
4

NAME

6       gnutls_certificate_set_x509_key_file - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int     gnutls_certificate_set_x509_key_file(gnutls_certificate_creden‐
12       tials_t  res,  const  char  *   certfile,   const   char   *   keyfile,
13       gnutls_x509_crt_fmt_t type);
14

ARGUMENTS

16       gnutls_certificate_credentials_t res
17                   is a gnutls_certificate_credentials_t structure.
18
19       const char * certfile
20                   is  a  file that containing the certificate list (path) for
21                   the specified private key, in PKCS7 format, or  a  list  of
22                   certificates
23
24       const char * keyfile
25                   is a file that contains the private key
26
27       gnutls_x509_crt_fmt_t type
28                   is PEM or DER
29

DESCRIPTION

31       This  function  sets  a certificate/private key pair in the gnutls_cer‐
32       tificate_credentials_t structure.  This function  may  be  called  more
33       than  once,  in  case  multiple keys/certificates exist for the server.
34       For clients that need to send more than its own end entity certificate,
35       e.g., also an intermediate CA cert, then the
36        certfile must contain the ordered certificate chain.
37
38       Note that the names in the certificate provided will be considered when
39       selecting the appropriate certificate to use (in case of multiple  cer‐
40       tificate/key pairs).
41
42       This  function can also accept URLs at  keyfile and  certfile . In that
43       case it will import the private key and certificate  indicated  by  the
44       URLs.   Note  that  the  supported  URLs  are  the  ones  indicated  by
45       gnutls_url_is_supported().
46
47       In case the  certfile is provided as a PKCS 11 URL, then  the  certifi‐
48       cate,  and its present issuers in the token are are imported (i.e., the
49       required trust chain).
50
51       If that function fails to load the  res structure is  at  an  undefined
52       state, it must not be reused to load other keys or certificates.
53

RETURNS

55       GNUTLS_E_SUCCESS (0) on success, or a negative error code.
56

REPORTING BUGS

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

SEE ALSO

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