gnutls\_x509\_trust\_list\_iter\_get\_ca(3) gnutls gnutls\_x509\_trust\_list\_iter\_get\_ca(3)

# [NAME](#NAME)

gnutls\_x509\_trust\_list\_iter\_get\_ca - API function

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;gnutls/x509.h&gt;**

**int gnutls\_x509\_trust\_list\_iter\_get\_ca(gnutls\_x509\_trust\_list\_t list, gnutls\_x509\_trust\_list\_iter\_t * iter, gnutls\_x509\_crt\_t * crt);**

# [ARGUMENTS](#ARGUMENTS)

[gnutls\_x509\_trust\_list\_t list](#gnutls_x509_trust_list_t)

The list

[gnutls\_x509\_trust\_list\_iter\_t * iter](#gnutls_x509_trust_list_iter_t)

A pointer to an iterator (initially the iterator should be **NULL**)

[gnutls\_x509\_crt\_t * crt](#gnutls_x509_crt_t)

where the certificate will be copied

# [DESCRIPTION](#DESCRIPTION)

This function obtains a certificate in the trust list and advances the iterator to the next certificate. The certificate returned in *crt* must be deallocated with **gnutls\_x509\_crt\_deinit()**.

When past the last element is accessed **GNUTLS\_E\_REQUESTED\_DATA\_NOT\_AVAILABLE** is returned and the iterator is reset.

The iterator is deinitialized and reset to **NULL** automatically by this function after iterating through all elements until **GNUTLS\_E\_REQUESTED\_DATA\_NOT\_AVAILABLE** is returned. If the iteration is aborted early, it must be manually deinitialized using **gnutls\_x509\_trust\_list\_iter\_deinit()**.

# [RETURNS](#RETURNS)

On success, **GNUTLS\_E\_SUCCESS** (0) is returned, otherwise a negative error value.

# [SINCE](#SINCE)

3.4.0

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;bugs@gnutls.org&gt;.  
Home page: https://www.gnutls.org

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2001-2023 Free Software Foundation, Inc., and others.  
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

# [SEE ALSO](#SEE_ALSO)

The full documentation for **gnutls** is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form visit

[https://www.gnutls.org/manual/](https://www.gnutls.org/manual/)

3.8.13 gnutls

---

Document: gnutls_x509_trust_list_iter_get_ca(3) from gnutls 3.8.13-r1 (Chainguard OS)
Source: https://gitlab.com/gnutls/gnutls
