Blame doc/functions/gnutls_psk_set_client_credentials_function2

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {void} {gnutls_psk_set_client_credentials_function2} (gnutls_psk_client_credentials_t @var{cred}, gnutls_psk_client_credentials_function2 * @var{func})
Packit Service 4684c1
@var{cred}: is a @code{gnutls_psk_server_credentials_t}  type.
Packit Service 4684c1
Packit Service 4684c1
@var{func}: is the callback function
Packit Service 4684c1
Packit Service 4684c1
This function can be used to set a callback to retrieve the username and
Packit Service 4684c1
password for client PSK authentication.
Packit Service 4684c1
The callback's function form is:
Packit Service 4684c1
int (*callback)(gnutls_session_t, gnutls_datum_t* username,
Packit Service 4684c1
gnutls_datum_t* key);
Packit Service 4684c1
Packit Service 4684c1
This callback function has the same semantics as that of @code{gnutls_psk_set_client_credentials_function()} ,
Packit Service 4684c1
but it allows non-string usernames to be used.
Packit Service 4684c1
Packit Service 4684c1
The  @code{username} and  @code{key} ->data must be allocated using @code{gnutls_malloc()} .
Packit Service 4684c1
The  @code{username} should be an ASCII string or UTF-8
Packit Service 4684c1
string. In case of a UTF-8 string it is recommended to be following
Packit Service 4684c1
the PRECIS framework for usernames (rfc8265).
Packit Service 4684c1
Packit Service 4684c1
The callback function will be called once per handshake.
Packit Service 4684c1
Packit Service 4684c1
The callback function should return 0 on success.
Packit Service 4684c1
-1 indicates an error.
Packit Service 4684c1
@end deftypefun