1gnutls_psk_set_server_credentialsg_nfuutnglcnstu_itpolsnsk3_(s3e)t_server_credentials_function3(3)
2
3
4
6 gnutls_psk_set_server_credentials_function3 - API function
7
9 #include <gnutls/gnutls.h>
10
11 void gnutls_psk_set_server_credentials_function3(gnutls_psk_server_cre‐
12 dentials_t cred, gnutls_psk_server_credentials_function3 func);
13
15 gnutls_psk_server_credentials_t cred
16 is a gnutls_psk_server_credentials_t type.
17
18 gnutls_psk_server_credentials_function3 func
19 is the callback function
20
22 This function can be used to set a callback to retrieve the user's PSK
23 credentials. The callback's function form is: int (*call‐
24 back)(gnutls_session_t, const gnutls_datum_t* username, gnutls_datum_t*
25 key, gnutls_psk_key_flags *flags);
26
27 This callback function has the same semantics as that of
28 gnutls_psk_set_server_credentials_function2(), but it returns flags as‐
29 sociated with the key. The callback may import external PSK using the
30 method described in RFC 9258 by using gnutls_psk_format_imported_iden‐
31 tity().
32
33 username contains the actual username. The key must be filled in us‐
34 ing the gnutls_malloc().
35
36 In case the callback returned a negative number then gnutls will assume
37 that the username does not exist.
38
39 The callback function will only be called once per handshake. The
40 callback function should return 0 on success, while -1 indicates an er‐
41 ror.
42
44 Report bugs to <bugs@gnutls.org>.
45 Home page: https://www.gnutls.org
46
47
49 Copyright © 2001-2023 Free Software Foundation, Inc., and others.
50 Copying and distribution of this file, with or without modification,
51 are permitted in any medium without royalty provided the copyright no‐
52 tice and this notice are preserved.
53
55 The full documentation for gnutls is maintained as a Texinfo manual.
56 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
57 visit
58
59 https://www.gnutls.org/manual/
60
61gnutls gnutl3s._8p.s2k_set_server_credentials_function3(3)