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 wants to send more than its own end entity certificate
35       (e.g.,  also an intermediate CA cert) then put the certificate chain in
36       certfile.
37
38       Currently only PKCS-1 encoded RSA and DSA private keys are accepted  by
39       this function.
40
41       This function can also accept PKCS 11 URLs. In that case it will import
42       the private key and certificate indicated by the urls.
43

RETURNS

45       GNUTLS_E_SUCCESS on success, or an error code.
46

REPORTING BUGS

48       Report   bugs   to    <bug-gnutls@gnu.org>.     GnuTLS    home    page:
49       http://www.gnu.org/software/gnutls/  General  help  using GNU software:
50       http://www.gnu.org/gethelp/
51
53       Copyright © 2008 Free Software Foundation.
54       Copying and distribution of this file, with  or  without  modification,
55       are  permitted  in  any  medium  without royalty provided the copyright
56       notice and this notice are preserved.
57

SEE ALSO

59       The full documentation for gnutls is maintained as  a  Texinfo  manual.
60       If  the  info  and gnutls programs are properly installed at your site,
61       the command
62
63              info gnutls
64
65       should give you access to the complete manual.
66
67
68
69gnutls                             2.12.g6n.u1tls_certificate_set_x509_key_file(3)
Impressum