1gnutls_psk_set_server_credentials_gfnuungtcnltusit_olpnss(k3_)set_server_credentials_function(3)
2
3
4
6 gnutls_psk_set_server_credentials_function - Used to set a callback to
7 retrieve the user's PSK credentials
8
10 #include <gnutls/gnutls.h>
11
12 void gnutls_psk_set_server_credentials_function(gnutls_psk_server_cre‐
13 dentials_t cred, gnutls_psk_server_credentials_function
14 * func);
15
17 gnutls_psk_server_credentials_t cred
18 is a gnutls_psk_server_credentials_t structure.
19
20 gnutls_psk_server_credentials_function * func
21 is the callback function
22
24 This function can be used to set a callback to retrieve the user's PSK
25 credentials. The callback's function form is: int (*call‐
26 back)(gnutls_session_t, const char* username, gnutls_datum_t* key);
27
28 username contains the actual username. The key must be filled in using
29 the gnutls_malloc().
30
31 In case the callback returned a negative number then gnutls will assume
32 that the username does not exist.
33
34 The callback function will only be called once per handshake. The
35 callback function should return 0 on success, while -1 indicates an
36 error.
37
39 Report bugs to <bug-gnutls@gnu.org>.
40
42 Copyright © 2006 Free Software Foundation.
43 Permission is granted to make and distribute verbatim copies of this
44 manual provided the copyright notice and this permission notice are
45 preserved on all copies.
46
48 The full documentation for gnutls is maintained as a Texinfo manual.
49 If the info and gnutls programs are properly installed at your site,
50 the command
51
52 info gnutls
53
54 should give you access to the complete manual.
55
56
57
58gnutls gnut1l.s6_.p3sk_set_server_credentials_function(3)