1gnutls_psk_set_client_credentialsg_nfuutnglcnstu_itpolsnsk2_(s3e)t_client_credentials_function2(3)
2
3
4

NAME

6       gnutls_psk_set_client_credentials_function2 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void gnutls_psk_set_client_credentials_function2(gnutls_psk_client_cre‐
12       dentials_t cred, gnutls_psk_client_credentials_function2 * func);
13

ARGUMENTS

15       gnutls_psk_client_credentials_t cred
16                   is a gnutls_psk_server_credentials_t type.
17
18       gnutls_psk_client_credentials_function2 * func
19                   is the callback function
20

DESCRIPTION

22       This function can be used to set a callback to  retrieve  the  username
23       and  password  for  client PSK authentication.  The callback's function
24       form is: int  (*callback)(gnutls_session_t,  gnutls_datum_t*  username,
25       gnutls_datum_t* key);
26
27       This   callback   function   has   the   same   semantics  as  that  of
28       gnutls_psk_set_client_credentials_function(), but it allows  non-string
29       usernames to be used.
30
31       The   username and  key ->data must be allocated using gnutls_malloc().
32       The  username should be an ASCII string or UTF-8 string. In case  of  a
33       UTF-8 string it is recommended to be following the PRECIS framework for
34       usernames (rfc8265).
35
36       The callback function will be called once per handshake.
37
38       The callback function should return 0 on success.  -1 indicates an  er‐
39       ror.
40

REPORTING BUGS

42       Report bugs to <bugs@gnutls.org>.
43       Home page: https://www.gnutls.org
44
45
47       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
48       Copying  and  distribution  of this file, with or without modification,
49       are permitted in any medium without royalty provided the copyright  no‐
50       tice and this notice are preserved.
51

SEE ALSO

53       The  full  documentation  for gnutls is maintained as a Texinfo manual.
54       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
55       visit
56
57       https://www.gnutls.org/manual/
58
59gnutls                          gnutl3s._8p.s2k_set_client_credentials_function2(3)
Impressum