1 .\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
2 .TH "gnutls_psk_set_client_credentials_function" 3 "2.12.6.1" "gnutls" "gnutls"
4 gnutls_psk_set_client_credentials_function \- API function
6 .B #include <gnutls/gnutls.h>
8 .BI "void gnutls_psk_set_client_credentials_function(gnutls_psk_client_credentials_t " cred ", gnutls_psk_client_credentials_function * " func ");"
10 .IP "gnutls_psk_client_credentials_t cred" 12
11 is a \fBgnutls_psk_server_credentials_t\fP structure.
12 .IP "gnutls_psk_client_credentials_function * func" 12
13 is the callback function
15 This function can be used to set a callback to retrieve the username and
16 password for client PSK authentication.
17 The callback's function form is:
18 int (*callback)(gnutls_session_t, char** username,
21 The \fIusername\fP and \fIkey\fP\->data must be allocated using \fBgnutls_malloc()\fP.
22 \fIusername\fP should be ASCII strings or UTF\-8 strings prepared using
23 the "SASLprep" profile of "stringprep".
25 The callback function will be called once per handshake.
27 The callback function should return 0 on success.
28 \-1 indicates an error.
30 Report bugs to <bug-gnutls@gnu.org>.
31 GnuTLS home page: http://www.gnu.org/software/gnutls/
32 General help using GNU software: http://www.gnu.org/gethelp/
34 Copyright \(co 2008 Free Software Foundation.
36 Copying and distribution of this file, with or without modification,
37 are permitted in any medium without royalty provided the copyright
38 notice and this notice are preserved.
40 The full documentation for
42 is maintained as a Texinfo manual. If the
46 programs are properly installed at your site, the command
50 should give you access to the complete manual.