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>. GnuTLS home page:
40 http://www.gnu.org/software/gnutls/ General help using GNU software:
41 http://www.gnu.org/gethelp/
42
44 Copyright © 2008 Free Software Foundation.
45 Copying and distribution of this file, with or without modification,
46 are permitted in any medium without royalty provided the copyright
47 notice and this notice are preserved.
48
50 The full documentation for gnutls is maintained as a Texinfo manual.
51 If the info and gnutls programs are properly installed at your site,
52 the command
53
54 info gnutls
55
56 should give you access to the complete manual.
57
58
59
60gnutls gnut2l.s8_.p6sk_set_server_credentials_function(3)