1gnutls_psk_set_client_credentials_gfnuungtcnltusit_olpnss(k3_)set_client_credentials_function(3)
2
3
4
6 gnutls_psk_set_client_credentials_function - API function
7
9 #include <gnutls/gnutls.h>
10
11 void gnutls_psk_set_client_credentials_function(gnutls_psk_client_cre‐
12 dentials_t cred,
13 gnutls_psk_client_credentials_function
14 * func);
15
17 gnutls_psk_client_credentials_t
18 cred
19 is a gnutls_psk_server_credentials_t structure.
20
21 gnutls_psk_client_credentials_function
22 * func
23 is the callback function
24
26 This function can be used to set a callback to retrieve the username
27 and password for client PSK authentication. The callback's function
28 form is: int (*callback)(gnutls_session_t, char** username,
29 gnutls_datum_t* key);
30
31 The username and key->data must be allocated using gnutls_malloc().
32 username should be ASCII strings or UTF-8 strings prepared using the
33 "SASLprep" profile of "stringprep".
34
35 The callback function will be called once per handshake.
36
37 The callback function should return 0 on success. -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_client_credentials_function(3)