1gnutls_certificate_get_x509_crt(3)  gnutls  gnutls_certificate_get_x509_crt(3)
2
3
4

NAME

6       gnutls_certificate_get_x509_crt - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int    gnutls_certificate_get_x509_crt(gnutls_certificate_credentials_t
12       res,  unsigned  index,  gnutls_x509_crt_t  **  crt_list,   unsigned   *
13       crt_list_size);
14

ARGUMENTS

16       gnutls_certificate_credentials_t res
17                   is a gnutls_certificate_credentials_t type.
18
19       unsigned index
20                   The index of the certificate list to obtain.
21
22       gnutls_x509_crt_t ** crt_list
23                   Where to store the certificate list.
24
25       unsigned * crt_list_size
26                   Will hold the number of certificates.
27

DESCRIPTION

29       Obtains  a X.509 certificate list that has been stored in  res with one
30       of   gnutls_certificate_set_x509_key(),   gnutls_certificate_set_key(),
31       gnutls_certificate_set_x509_key_file(),                 gnutls_certifi‐
32       cate_set_x509_key_file2(),  gnutls_certificate_set_x509_key_mem(),   or
33       gnutls_certificate_set_x509_key_mem2().  Each  certificate  in  the re‐
34       turned    certificate     list     must     be     deallocated     with
35       gnutls_x509_crt_deinit(),  and  the  list  itself  must  be  freed with
36       gnutls_free().
37
38       The    index   matches   the   return    value    of    gnutls_certifi‐
39       cate_set_x509_key()  and  friends  functions,  when the GNUTLS_CERTIFI‐
40       CATE_API_V2 flag is set.
41
42       If  there  is  no  certificate  with  the  given  index,   GNUTLS_E_RE‐
43       QUESTED_DATA_NOT_AVAILABLE  is  returned.  If  the certificate with the
44       given index is not a X.509 certificate, GNUTLS_E_INVALID_REQUEST is re‐
45       turned.  The returned certificates must be deinitialized after use, and
46       the  crt_list pointer must be freed using gnutls_free().
47

RETURNS

49       GNUTLS_E_SUCCESS (0) on success, or a negative error code.
50

SINCE

52       3.4.0
53

REPORTING BUGS

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

SEE ALSO

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