1gnutls_psk_set_server_credentials_gfnuungtcnltusit_olpnss(k3_)set_server_credentials_function(3)
2
3
4
6 gnutls_psk_set_server_credentials_function - API function
7
9 #include <gnutls/gnutls.h>
10
11 void gnutls_psk_set_server_credentials_function(gnutls_psk_server_cre‐
12 dentials_t cred,
13 gnutls_psk_server_credentials_function
14 * func);
15
17 gnutls_psk_server_credentials_t
18 cred
19 is a gnutls_psk_server_credentials_t structure.
20
21 gnutls_psk_server_credentials_function
22 * func
23 is the callback function
24
26 This function can be used to set a callback to retrieve the user's PSK
27 credentials. The callback's function form is: int (*call‐
28 back)(gnutls_session_t, const char* username, gnutls_datum_t* key);
29
30 username contains the actual username. The key must be filled in using
31 the gnutls_malloc().
32
33 In case the callback returned a negative number then gnutls will assume
34 that the username does not exist.
35
36 The callback function will only be called once per handshake. The
37 callback function should return 0 on success, while -1 indicates an
38 error.
39
41 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
42 http://www.gnu.org/software/gnutls/ General help using GNU software:
43 http://www.gnu.org/gethelp/
44
46 Copyright © 2008 Free Software Foundation.
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
50
52 The full documentation for gnutls is maintained as a Texinfo manual.
53 If the info and gnutls programs are properly installed at your site,
54 the command
55
56 info gnutls
57
58 should give you access to the complete manual.
59
60
61
62gnutls gn2u.t1l2s._6p.s1k_set_server_credentials_function(3)