Blob Blame History Raw




@deftypefun {int} {gnutls_x509_trust_list_iter_get_ca} (gnutls_x509_trust_list_t @var{list}, gnutls_x509_trust_list_iter_t * @var{iter}, gnutls_x509_crt_t * @var{crt})
@var{list}: The list

@var{iter}: A pointer to an iterator (initially the iterator should be @code{NULL} )

@var{crt}: where the certificate will be copied

This function obtains a certificate in the trust list and advances the
iterator to the next certificate. The certificate returned in  @code{crt} must be
deallocated with @code{gnutls_x509_crt_deinit()} .

When past the last element is accessed @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} 
is returned and the iterator is reset.

The iterator is deinitialized and reset to @code{NULL}  automatically by this
function after iterating through all elements until
@code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE}  is returned. If the iteration is
aborted early, it must be manually deinitialized using
@code{gnutls_x509_trust_list_iter_deinit()} .

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
negative error value.

@strong{Since:} 3.4.0
@end deftypefun