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
34       returned    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,
43       GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE  is  returned. If the certificate
44       with   the    given    index    is    not    a    X.509    certificate,
45       GNUTLS_E_INVALID_REQUEST is returned. The returned certificates must be
46       deinitialized after use, and the  crt_list pointer must be freed  using
47       gnutls_free().
48

RETURNS

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

SINCE

53       3.4.0
54

REPORTING BUGS

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

SEE ALSO

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