Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_psk_set_server_credentials_function.3
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"
3 .SH NAME
4 gnutls_psk_set_server_credentials_function \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "void gnutls_psk_set_server_credentials_function(gnutls_psk_server_credentials_t                                             " cred ", gnutls_psk_server_credentials_function                                             * " func ");"
9 .SH ARGUMENTS
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
14 .SH "DESCRIPTION"
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,
18 gnutls_datum_t* key);
19
20 \fIusername\fP contains the actual username.
21 The \fIkey\fP must be filled in using the \fBgnutls_malloc()\fP.
22
23 In case the callback returned a negative number then gnutls will
24 assume that the username does not exist.
25
26 The callback function will only be called once per handshake.  The
27 callback function should return 0 on success, while \-1 indicates
28 an error.
29 .SH "REPORTING BUGS"
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/
33 .SH COPYRIGHT
34 Copyright \(co 2008 Free Software Foundation.
35 .br
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.
39 .SH "SEE ALSO"
40 The full documentation for
41 .B gnutls
42 is maintained as a Texinfo manual.  If the
43 .B info
44 and
45 .B gnutls
46 programs are properly installed at your site, the command
47 .IP
48 .B info gnutls
49 .PP
50 should give you access to the complete manual.