Blame doc/functions/gnutls_certificate_type_get2

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {gnutls_certificate_type_t} {gnutls_certificate_type_get2} (gnutls_session_t @var{session}, gnutls_ctype_target_t @var{target})
Packit aea12f
@var{session}: is a @code{gnutls_session_t}  type.
Packit aea12f
Packit aea12f
@var{target}: is a @code{gnutls_ctype_target_t}  type.
Packit aea12f
Packit aea12f
This function returns the type of the certificate that a side
Packit aea12f
is negotiated to use.  The certificate type is by default X.509,
Packit aea12f
unless an alternative certificate type is enabled by @code{gnutls_init()}  and
Packit aea12f
negotiated during the session.
Packit aea12f
Packit aea12f
The  @code{target} parameter specifies whether to request the negotiated
Packit aea12f
certificate type for the client (@code{GNUTLS_CTYPE_CLIENT} ),
Packit aea12f
or for the server (@code{GNUTLS_CTYPE_SERVER} ). Additionally, in P2P mode
Packit aea12f
connection set up where you don't know in advance who will be client
Packit aea12f
and who will be server you can use the flag (@code{GNUTLS_CTYPE_OURS} ) and
Packit aea12f
(@code{GNUTLS_CTYPE_PEERS} ) to retrieve the corresponding certificate types.
Packit aea12f
Packit aea12f
Resumed sessions will return the certificate type that was negotiated
Packit aea12f
and used in the original session. That is, this function can be used
Packit aea12f
to reliably determine the type of the certificate returned by
Packit aea12f
@code{gnutls_certificate_get_peers()} .
Packit aea12f
Packit aea12f
@strong{Returns:} the currently used @code{gnutls_certificate_type_t}  certificate
Packit aea12f
type for the client or the server.
Packit aea12f
Packit aea12f
@strong{Since:} 3.6.4
Packit aea12f
@end deftypefun