1 .\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
2 .TH "gnutls_psk_set_server_credentials_function" 3 "2.12.6.1" "gnutls" "gnutls"
4 gnutls_psk_set_server_credentials_function \- API function
6 .B #include <gnutls/gnutls.h>
8 .BI "void gnutls_psk_set_server_credentials_function(gnutls_psk_server_credentials_t " cred ", gnutls_psk_server_credentials_function * " func ");"
10 .IP "gnutls_psk_server_credentials_t cred" 12
11 is a \fBgnutls_psk_server_credentials_t\fP structure.
12 .IP "gnutls_psk_server_credentials_function * func" 12
13 is the callback function
15 This function can be used to set a callback to retrieve the user's PSK credentials.
16 The callback's function form is:
17 int (*callback)(gnutls_session_t, const char* username,
20 \fIusername\fP contains the actual username.
21 The \fIkey\fP must be filled in using the \fBgnutls_malloc()\fP.
23 In case the callback returned a negative number then gnutls will
24 assume that the username does not exist.
26 The callback function will only be called once per handshake. The
27 callback function should return 0 on success, while \-1 indicates
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.