1 .\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
2 .TH "gnutls_ia_set_server_avp_function" 3 "2.12.6.1" "gnutls" "gnutls"
4 gnutls_ia_set_server_avp_function \- API function
6 .B #include <gnutls/extra.h>
8 .BI "void gnutls_ia_set_server_avp_function(gnutls_ia_server_credentials_t " cred ", gnutls_ia_avp_func " avp_func ");"
10 .IP "gnutls_ia_server_credentials_t cred" 12
11 is a \fBgnutls_ia_server_credentials_t\fP structure.
12 .IP "gnutls_ia_avp_func avp_func" 12
14 Set the TLS/IA AVP callback handler used for the session.
16 The callback's function form is:
17 int (*avp_func) (gnutls_session_t session, void *ptr,
18 const char *last, size_t lastlen,
19 char **next, size_t *nextlen);
21 The \fIsession\fP parameter is the \fBgnutls_session_t\fP structure
22 corresponding to the current session. The \fIptr\fP parameter is the
23 application hook pointer, set through
24 \fBgnutls_ia_set_server_avp_ptr()\fP. The AVP received from the client
25 is present in \fIlast\fP of \fIlastlen\fP size. The newly allocated output
26 AVP to send to the client should be placed in *\fInext\fP of *\fInextlen\fP
29 The AVP callback is called to process incoming AVPs from the
30 client, and to get a new AVP to send to the client. It can also be
31 used to instruct the TLS/IA handshake to do go into the
32 Intermediate or Final phases. It return a negative error code, or
33 a \fBgnutls_ia_apptype_t\fP message type.
35 The callback may invoke \fBgnutls_ia_permute_inner_secret()\fP to mix any
36 generated session keys with the TLS/IA inner secret.
38 Specifically, return \fBGNUTLS_IA_APPLICATION_PAYLOAD\fP (0) to send
39 another AVP to the client, return
40 \fBGNUTLS_IA_INTERMEDIATE_PHASE_FINISHED\fP (1) to indicate that an
41 IntermediatePhaseFinished message should be sent, and return
42 \fBGNUTLS_IA_FINAL_PHASE_FINISHED\fP (2) to indicate that an
43 FinalPhaseFinished message should be sent. In the last two cases,
44 the contents of the \fInext\fP and \fInextlen\fP parameter is not used.
46 Note that the callback must use allocate the \fInext\fP parameter using
47 \fBgnutls_malloc()\fP, because it is released via \fBgnutls_free()\fP by the
48 TLS/IA handshake function.
50 Report bugs to <bug-gnutls@gnu.org>.
51 GnuTLS home page: http://www.gnu.org/software/gnutls/
52 General help using GNU software: http://www.gnu.org/gethelp/
54 Copyright \(co 2008 Free Software Foundation.
56 Copying and distribution of this file, with or without modification,
57 are permitted in any medium without royalty provided the copyright
58 notice and this notice are preserved.
60 The full documentation for
62 is maintained as a Texinfo manual. If the
66 programs are properly installed at your site, the command
70 should give you access to the complete manual.