



@deftypefun {int} {gnutls_pcert_import_x509_list} (gnutls_pcert_st * @var{pcert_list}, gnutls_x509_crt_t * @var{crt}, unsigned * @var{ncrt}, unsigned int @var{flags})
@var{pcert_list}: The structures to store the certificates; must not contain initialized @code{gnutls_pcert_st}  structures.

@var{crt}: The certificates to be imported

@var{ncrt}: The number of certificates in  @code{crt} ; will be updated if necessary

@var{flags}: zero or @code{GNUTLS_X509_CRT_LIST_SORT} 

This convenience function will import the given certificates to an
already allocated set of @code{gnutls_pcert_st}  structures. The structures must
be deinitialized afterwards using @code{gnutls_pcert_deinit()} .  @code{pcert_list} should contain space for at least  @code{ncrt} elements.

In the case @code{GNUTLS_X509_CRT_LIST_SORT}  is specified and that
function cannot sort the list, @code{GNUTLS_E_CERTIFICATE_LIST_UNSORTED} 
will be returned. Currently sorting can fail if the list size
exceeds an internal constraint (16).

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

@strong{Since:} 3.4.0
@end deftypefun
