1gnutls_certificate_set_x509_simgpnluet_lpskg_cncsue1tr2lt_simfeimc(a3t)e_set_x509_simple_pkcs12_mem(3)
2
3
4

NAME

6       gnutls_certificate_set_x509_simple_pkcs12_mem - API function
7

SYNOPSIS

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

ARGUMENTS

16       gnutls_certificate_credentials_t res
17                   is a gnutls_certificate_credentials_t type.
18
19       const gnutls_datum_t * p12blob
20                   the 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       Encrypted  PKCS12  bags and PKCS8 private keys are supported.  However,
36       only password based security, and the same password for all operations,
37       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

SINCE

62       2.8.0
63

REPORTING BUGS

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

SEE ALSO

76       The full documentation for gnutls is maintained as  a  Texinfo  manual.
77       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
78       visit
79
80       https://www.gnutls.org/manual/
81
82gnutls                        gnutls3_.c6e.r1t5ificate_set_x509_simple_pkcs12_mem(3)
Impressum