Blame doc/functions/gnutls_ocsp_resp_get_certs

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_ocsp_resp_get_certs} (gnutls_ocsp_resp_const_t @var{resp}, gnutls_x509_crt_t ** @var{certs}, size_t * @var{ncerts})
Packit Service 4684c1
@var{resp}: should contain a @code{gnutls_ocsp_resp_t}  type
Packit Service 4684c1
Packit Service 4684c1
@var{certs}: newly allocated array with @code{gnutls_x509_crt_t}  certificates
Packit Service 4684c1
Packit Service 4684c1
@var{ncerts}: output variable with number of allocated certs.
Packit Service 4684c1
Packit Service 4684c1
This function will extract the X.509 certificates found in the
Packit Service 4684c1
Basic OCSP Response.  The  @code{certs} output variable will hold a newly
Packit Service 4684c1
allocated zero-terminated array with X.509 certificates.
Packit Service 4684c1
Packit Service 4684c1
Every certificate in the array needs to be de-allocated with
Packit Service 4684c1
@code{gnutls_x509_crt_deinit()}  and the array itself must be freed using
Packit Service 4684c1
@code{gnutls_free()} .
Packit Service 4684c1
Packit Service 4684c1
Both the  @code{certs} and  @code{ncerts} variables may be NULL.  Then the
Packit Service 4684c1
function will work as normal but will not return the NULL:d
Packit Service 4684c1
information.  This can be used to get the number of certificates
Packit Service 4684c1
only, or to just get the certificate array without its size.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit Service 4684c1
negative error value.
Packit Service 4684c1
@end deftypefun