



@deftypefun {int} {gnutls_x509_trust_list_get_issuer} (gnutls_x509_trust_list_t @var{list}, gnutls_x509_crt_t @var{cert}, gnutls_x509_crt_t * @var{issuer}, unsigned int @var{flags})
@var{list}: The list

@var{cert}: is the certificate to find issuer for

@var{issuer}: Will hold the issuer if any. Should be treated as constant
unless @code{GNUTLS_TL_GET_COPY}  is set in  @code{flags} .

@var{flags}: flags from @code{gnutls_trust_list_flags_t}  (@code{GNUTLS_TL_GET_COPY}  is applicable)

This function will find the issuer of the given certificate.
If the flag @code{GNUTLS_TL_GET_COPY}  is specified a copy of the issuer
will be returned which must be freed using @code{gnutls_x509_crt_deinit()} .
In that case the provided  @code{issuer} must not be initialized.

Note that the flag @code{GNUTLS_TL_GET_COPY}  is required for this function
to work with PKCS@code{11}  trust lists in a thread-safe way.

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

@strong{Since:} 3.0
@end deftypefun
