1gnutls_ia_set_server_avp_function(3)gnutlsgnutls_ia_set_server_avp_function(3)
2
3
4

NAME

6       gnutls_ia_set_server_avp_function - API function
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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 a gnutls_ia_apptype_t mes‐
38       sage 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  (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

REPORTING BUGS

55       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
56       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
57       http://www.gnu.org/gethelp/
58
60       Copyright © 2008 Free Software Foundation.
61       Copying  and  distribution  of this file, with or without modification,
62       are permitted in any medium  without  royalty  provided  the  copyright
63       notice and this notice are preserved.
64

SEE ALSO

66       The  full  documentation  for gnutls is maintained as a Texinfo manual.
67       If the info and gnutls programs are properly installed  at  your  site,
68       the command
69
70              info gnutls
71
72       should give you access to the complete manual.
73
74
75
76gnutls                             2.12.6.1gnutls_ia_set_server_avp_function(3)
Impressum