1gnutls_certificate_set_x509_sigmnpultel_sp_kgccnesur1tt2li_sffiiclaet(e3_)set_x509_simple_pkcs12_file(3)
2
3
4

NAME

6       gnutls_certificate_set_x509_simple_pkcs12_file - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int      gnutls_certificate_set_x509_simple_pkcs12_file(gnutls_certifi‐
12       cate_credentials_t res, const char * pkcs12file,  gnutls_x509_crt_fmt_t
13       type, const char * password);
14

ARGUMENTS

16       gnutls_certificate_credentials_t res
17                   is a gnutls_certificate_credentials_t type.
18
19       const char * pkcs12file
20                   filename of file containing PKCS12 blob.
21
22       gnutls_x509_crt_fmt_t type
23                   is PEM or DER of the  pkcs12file .
24
25       const char * password
26                   optional  password  used  to  decrypt PKCS12 file, bags and
27                   keys.
28

DESCRIPTION

30       This function sets a certificate/private key pair and/or a CRL  in  the
31       gnutls_certificate_credentials_t  type.   This  function  may be called
32       more than once  (in  case  multiple  keys/certificates  exist  for  the
33       server).
34
35       PKCS12  files  with  a  MAC, encrypted bags and PKCS 8 private keys are
36       supported. However, only password based security, and the same password
37       for all operations, are supported.
38
39       PKCS12  file  may contain many keys and/or certificates, and this func‐
40       tion will try to auto-detect based on the key ID  the  certificate  and
41       key  pair to use. If the PKCS12 file contain the issuer of the selected
42       certificate, it will be appended to the certificate to form a chain.
43
44       If more than one private keys are stored in the PKCS12 file, then  only
45       one key will be read (and it is undefined which one).
46
47       It  is believed that the limitations of this function is acceptable for
48       most usage, and that any more flexibility  would  introduce  complexity
49       that would make it harder to use this functionality at all.
50
51       Note that, this function by default returns zero on success and a nega‐
52       tive value on  error.   Since  3.5.6,  when  the  flag  GNUTLS_CERTIFI‐
53       CATE_API_V2  is  set using gnutls_certificate_set_flags() it returns an
54       index (greater or equal to zero). That index can be used to other func‐
55       tions to refer to the added key-pair.
56

RETURNS

58       On  success this functions returns zero, and otherwise a negative value
59       on error (see above for modifying that behavior).
60

REPORTING BUGS

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

SEE ALSO

73       The full documentation for gnutls is maintained as  a  Texinfo  manual.
74       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
75       visit
76
77       https://www.gnutls.org/manual/
78
79gnutls                       gnutls_c3e.r6t.i8ficate_set_x509_simple_pkcs12_file(3)
Impressum