Blame doc/functions/gnutls_srp_set_client_credentials_function
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@deftypefun {void} {gnutls_srp_set_client_credentials_function} (gnutls_srp_client_credentials_t @var{cred}, gnutls_srp_client_credentials_function * @var{func})
|
|
Packit Service |
4684c1 |
@var{cred}: is a @code{gnutls_srp_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
|
|
Packit Service |
4684c1 |
username and password for client SRP authentication. The
|
|
Packit Service |
4684c1 |
callback's function form is:
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int (*callback)(gnutls_session_t, char** username, char**password);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The @code{username} and @code{password} must be allocated using
|
|
Packit Service |
4684c1 |
@code{gnutls_malloc()} .
|
|
Packit Service |
4684c1 |
|
|
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). The password can
|
|
Packit Service |
4684c1 |
be in ASCII format, or normalized using @code{gnutls_utf8_password_normalize()} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The callback function will be called once per handshake before the
|
|
Packit Service |
4684c1 |
initial hello message is sent.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The callback should not return a negative error code the second
|
|
Packit Service |
4684c1 |
time called, since the handshake procedure will be aborted.
|
|
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
|