|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@deftypefun {int} {gnutls_certificate_get_x509_crt} (gnutls_certificate_credentials_t @var{res}, unsigned @var{index}, gnutls_x509_crt_t ** @var{crt_list}, unsigned * @var{crt_list_size})
|
|
Packit |
aea12f |
@var{res}: is a @code{gnutls_certificate_credentials_t} type.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@var{index}: The index of the certificate list to obtain.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@var{crt_list}: Where to store the certificate list.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@var{crt_list_size}: Will hold the number of certificates.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
Obtains a X.509 certificate list that has been stored in @code{res} with one of
|
|
Packit |
aea12f |
@code{gnutls_certificate_set_x509_key()} , @code{gnutls_certificate_set_key()} ,
|
|
Packit |
aea12f |
@code{gnutls_certificate_set_x509_key_file()} ,
|
|
Packit |
aea12f |
@code{gnutls_certificate_set_x509_key_file2()} ,
|
|
Packit |
aea12f |
@code{gnutls_certificate_set_x509_key_mem()} , or
|
|
Packit |
aea12f |
@code{gnutls_certificate_set_x509_key_mem2()} . Each certificate in the returned
|
|
Packit |
aea12f |
certificate list must be deallocated with @code{gnutls_x509_crt_deinit()} , and the
|
|
Packit |
aea12f |
list itself must be freed with @code{gnutls_free()} .
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
The @code{index} matches the return value of @code{gnutls_certificate_set_x509_key()} and friends
|
|
Packit |
aea12f |
functions, when the @code{GNUTLS_CERTIFICATE_API_V2} flag is set.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
If there is no certificate with the given index,
|
|
Packit |
aea12f |
@code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE} is returned. If the certificate
|
|
Packit |
aea12f |
with the given index is not a X.509 certificate, @code{GNUTLS_E_INVALID_REQUEST}
|
|
Packit |
aea12f |
is returned. The returned certificates must be deinitialized after
|
|
Packit |
aea12f |
use, and the @code{crt_list} pointer must be freed using @code{gnutls_free()} .
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code.
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
@strong{Since:} 3.4.0
|
|
Packit |
aea12f |
@end deftypefun
|