Debian Codegraph @

doc/functions/gnutls_certificate_type_get2

raw
1
2
3
4
5 @deftypefun {gnutls_certificate_type_t} {gnutls_certificate_type_get2} (gnutls_session_t @var{session}, gnutls_ctype_target_t @var{target})
6 @var{session}: is a @code{gnutls_session_t} type.
7
8 @var{target}: is a @code{gnutls_ctype_target_t} type.
9
10 This function returns the type of the certificate that a side
11 is negotiated to use. The certificate type is by default X.509,
12 unless an alternative certificate type is enabled by @code{gnutls_init()} and
13 negotiated during the session.
14
15 The @code{target} parameter specifies whether to request the negotiated
16 certificate type for the client (@code{GNUTLS_CTYPE_CLIENT} ),
17 or for the server (@code{GNUTLS_CTYPE_SERVER} ). Additionally, in P2P mode
18 connection set up where you don't know in advance who will be client
19 and who will be server you can use the flag (@code{GNUTLS_CTYPE_OURS} ) and
20 (@code{GNUTLS_CTYPE_PEERS} ) to retrieve the corresponding certificate types.
21
22 Resumed sessions will return the certificate type that was negotiated
23 and used in the original session. That is, this function can be used
24 to reliably determine the type of the certificate returned by
25 @code{gnutls_certificate_get_peers()} .
26
27 @strong{Returns:} the currently used @code{gnutls_certificate_type_t} certificate
28 type for the client or the server.
29
30 @strong{Since:} 3.6.4
31 @end deftypefun