1gnutls_psk_set_client_credentials_gfnuungtcnltusit_olpnss(k3_)set_client_credentials_function(3)
2
3
4
6 gnutls_psk_set_client_credentials_function - API function
7
9 #include <gnutls/gnutls.h>
10
11 void gnutls_psk_set_client_credentials_function(gnutls_psk_client_cre‐
12 dentials_t cred, gnutls_psk_client_credentials_function * func);
13
15 gnutls_psk_client_credentials_t cred
16 is a gnutls_psk_server_credentials_t type.
17
18 gnutls_psk_client_credentials_function * func
19 is the callback function
20
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, char** username, gnutls_da‐
25 tum_t* key);
26
27 The username and key ->data must be allocated using gnutls_malloc().
28 The username should be an ASCII string or UTF-8 string. In case of a
29 UTF-8 string it is recommended to be following the PRECIS framework for
30 usernames (rfc8265).
31
32 The callback function will be called once per handshake.
33
34 The callback function should return 0 on success. -1 indicates an er‐
35 ror.
36
38 Report bugs to <bugs@gnutls.org>.
39 Home page: https://www.gnutls.org
40
41
43 Copyright © 2001-2023 Free Software Foundation, Inc., and others.
44 Copying and distribution of this file, with or without modification,
45 are permitted in any medium without royalty provided the copyright no‐
46 tice and this notice are preserved.
47
49 The full documentation for gnutls is maintained as a Texinfo manual.
50 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
51 visit
52
53 https://www.gnutls.org/manual/
54
55gnutls gnut3l.s8_.p2sk_set_client_credentials_function(3)