1gnutls_ia_set_client_avp_function(3)gnutlsgnutls_ia_set_client_avp_function(3)
2
3
4
6 gnutls_ia_set_client_avp_function - Used to set a AVP callback
7
9 #include <gnutls/extra.h>
10
11 void gnutls_ia_set_client_avp_function(gnutls_ia_client_credentials_t
12 cred, gnutls_ia_avp_func avp_func);
13
15 gnutls_ia_client_credentials_t cred
16 is a gnutls_ia_client_credentials_t structure.
17
18 gnutls_ia_avp_func avp_func
19 is the callback function
20
22 Set the TLS/IA AVP callback handler used for the session.
23
24 The AVP callback is called to process AVPs received from the server,
25 and to get a new AVP to send to the server.
26
27 The callback's function form is: int (*avp_func) (gnutls_session_t ses‐
28 sion, void *ptr, const char *last, size_t lastlen, char **next, size_t
29 *nextlen);
30
31 The session parameter is the gnutls_session_t structure corresponding
32 to the current session. The ptr parameter is the application hook
33 pointer, set through gnutls_ia_set_client_avp_ptr(). The AVP received
34 from the server is present in last of lastlen size, which will be NULL
35 on the first invocation. The newly allocated output AVP to send to the
36 server should be placed in *next of *nextlen size.
37
38 The callback may invoke gnutls_ia_permute_inner_secret() to mix any
39 generated session keys with the TLS/IA inner secret.
40
41 Return 0 (GNUTLS_IA_APPLICATION_PAYLOAD) on success, or a negative
42 error code to abort the TLS/IA handshake.
43
44 Note that the callback must use allocate the next parameter using
45 gnutls_malloc(), because it is released via gnutls_free() by the TLS/IA
46 handshake function.
47
49 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
50 http://www.gnu.org/software/gnutls/ General help using GNU software:
51 http://www.gnu.org/gethelp/
52
54 Copyright © 2008 Free Software Foundation.
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved.
58
60 The full documentation for gnutls is maintained as a Texinfo manual.
61 If the info and gnutls programs are properly installed at your site,
62 the command
63
64 info gnutls
65
66 should give you access to the complete manual.
67
68
69
70gnutls 2.8.6gnutls_ia_set_client_avp_function(3)