Blame doc/functions/gnutls_certificate_get_peers

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {const gnutls_datum_t *} {gnutls_certificate_get_peers} (gnutls_session_t          @var{session}, unsigned int * @var{list_size})
Packit aea12f
@var{session}: is a gnutls session
Packit aea12f
Packit aea12f
@var{list_size}: is the length of the certificate list (may be @code{NULL} )
Packit aea12f
Packit aea12f
Get the peer's raw certificate (chain) as sent by the peer.  These
Packit aea12f
certificates are in raw format (DER encoded for X.509).  In case of
Packit aea12f
a X.509 then a certificate list may be present.  The list
Packit aea12f
is provided as sent by the server; the server must send as first
Packit aea12f
certificate in the list its own certificate, following the
Packit aea12f
issuer's certificate, then the issuer's issuer etc. However, there
Packit aea12f
are servers which violate this principle and thus on certain
Packit aea12f
occasions this may be an unsorted list.
Packit aea12f
Packit aea12f
In resumed sessions, this function will return the peer's certificate
Packit aea12f
list as used in the first/original session.
Packit aea12f
Packit aea12f
@strong{Returns:} a pointer to a @code{gnutls_datum_t}  containing the peer's
Packit aea12f
certificates, or @code{NULL}  in case of an error or if no certificate
Packit aea12f
was used.
Packit aea12f
@end deftypefun