1gnutls_ia_set_server_avp_function(3)gnutlsgnutls_ia_set_server_avp_function(3)
2
3
4
6 gnutls_ia_set_server_avp_function - Used to set a AVP callback
7
9 #include <gnutls/extra.h>
10
11 void gnutls_ia_set_server_avp_function(gnutls_ia_server_credentials_t
12 cred, gnutls_ia_avp_func avp_func);
13
15 gnutls_ia_server_credentials_t cred
16 is a gnutls_ia_server_credentials_t structure.
17
18 gnutls_ia_avp_func avp_func
19
21 Set the TLS/IA AVP callback handler used for the session.
22
23 The callback's function form is: int (*avp_func) (gnutls_session_t ses‐
24 sion, void *ptr, const char *last, size_t lastlen, char **next, size_t
25 *nextlen);
26
27 The session parameter is the gnutls_session_t structure corresponding
28 to the current session. The ptr parameter is the application hook
29 pointer, set through gnutls_ia_set_server_avp_ptr(). The AVP received
30 from the client is present in last of lastlen size. The newly allo‐
31 cated output AVP to send to the client should be placed in *next of
32 *nextlen size.
33
34 The AVP callback is called to process incoming AVPs from the client,
35 and to get a new AVP to send to the client. It can also be used to
36 instruct the TLS/IA handshake to do go into the Intermediate or Final
37 phases. It return a negative error code, or an gnutls_ia_apptype_t
38 message type.
39
40 The callback may invoke gnutls_ia_permute_inner_secret() to mix any
41 generated session keys with the TLS/IA inner secret.
42
43 Specifically, return GNUTLS_IA_APPLICATION_PAYLOAD (0) to send another
44 AVP to the client, return GNUTLS_IA_INTERMEDIATE_PHASE_FINISHED (1) to
45 indicate that an IntermediatePhaseFinished message should be sent, and
46 return GNUTLS_IA_FINAL_PHASE_FINISHED [22m(2) to indicate that an Final‐
47 PhaseFinished message should be sent. In the last two cases, the con‐
48 tents of the next and nextlen parameter is not used.
49
50 Note that the callback must use allocate the next parameter using
51 gnutls_malloc(), because it is released via gnutls_free() by the TLS/IA
52 handshake function.
53
55 Report bugs to <bug-gnutls@gnu.org>.
56
58 Copyright © 2006 Free Software Foundation.
59 Permission is granted to make and distribute verbatim copies of this
60 manual provided the copyright notice and this permission notice are
61 preserved on all copies.
62
64 The full documentation for gnutls is maintained as a Texinfo manual.
65 If the info and gnutls programs are properly installed at your site,
66 the command
67
68 info gnutls
69
70 should give you access to the complete manual.
71
72
73
74gnutls 1.6.3gnutls_ia_set_server_avp_function(3)