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, gnutls_psk_server_credentials_function
13 * func);
14
16 gnutls_psk_server_credentials_t cred
17 is a gnutls_psk_server_credentials_t type.
18
19 gnutls_psk_server_credentials_function * func
20 is the callback function
21
23 This function can be used to set a callback to retrieve the user's PSK
24 credentials. The callback's function form is: int (*call‐
25 back)(gnutls_session_t, const char* username, gnutls_datum_t* key);
26
27 username contains the actual username. The key must be filled in
28 using the gnutls_malloc().
29
30 In case the callback returned a negative number then gnutls will assume
31 that the username does not exist.
32
33 The callback function will only be called once per handshake. The
34 callback function should return 0 on success, while -1 indicates an
35 error.
36
38 Report bugs to <bugs@gnutls.org>.
39 Home page: https://www.gnutls.org
40
41
43 Copyright © 2001-2020 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
46 notice 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 gnu3t.l6s._1p3sk_set_server_credentials_function(3)