1gnutls_ocsp_resp_get_certs(3)       gnutls       gnutls_ocsp_resp_get_certs(3)
2
3
4

NAME

6       gnutls_ocsp_resp_get_certs - API function
7

SYNOPSIS

9       #include <gnutls/ocsp.h>
10
11       int         gnutls_ocsp_resp_get_certs(gnutls_ocsp_resp_t         resp,
12       gnutls_x509_crt_t ** certs, size_t * ncerts);
13

ARGUMENTS

15       gnutls_ocsp_resp_t resp
16                   should contain a gnutls_ocsp_resp_t type
17
18       gnutls_x509_crt_t ** certs
19                   newly allocated array with gnutls_x509_crt_t certificates
20
21       size_t * ncerts
22                   output variable with number of allocated certs.
23

DESCRIPTION

25       This function will extract the X.509 certificates found  in  the  Basic
26       OCSP  Response.  The  certs output variable will hold a newly allocated
27       zero-terminated array with X.509 certificates.
28
29       Every  certificate  in  the  array  needs  to  be   de-allocated   with
30       gnutls_x509_crt_deinit()  and  the  array  itself  must  be freed using
31       gnutls_free().
32
33       Both the  certs and  ncerts variables may be NULL.  Then  the  function
34       will  work  as normal but will not return the NULL:d information.  This
35       can be used to get the number of certificates only, or to just get  the
36       certificate array without its size.
37

RETURNS

39       On  success,  GNUTLS_E_SUCCESS  (0)  is  returned, otherwise a negative
40       error value.
41

REPORTING BUGS

43       Report bugs to <bugs@gnutls.org>.
44       Home page: http://www.gnutls.org
45
46
48       Copyright © 2001-2018 Free Software Foundation, Inc., and others.
49       Copying and distribution of this file, with  or  without  modification,
50       are  permitted  in  any  medium  without royalty provided the copyright
51       notice and this notice are preserved.
52

SEE ALSO

54       The full documentation for gnutls is maintained as  a  Texinfo  manual.
55       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
56       visit
57
58       http://www.gnutls.org/manual/
59
60gnutls                               3.6.5       gnutls_ocsp_resp_get_certs(3)
Impressum