1gnutls_session_get_data2(3)         gnutls         gnutls_session_get_data2(3)
2
3
4

NAME

6       gnutls_session_get_data2 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_session_get_data2(gnutls_session_t session, gnutls_datum_t *
12       data);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t type.
17
18       gnutls_datum_t * data
19                   is a pointer to a datum that will hold the session.
20

DESCRIPTION

22       Returns necessary parameters to support resumption. The  client  should
23       call  this  function and store the returned session data. A session can
24       be resumed later by calling gnutls_session_set_data() with the returned
25       data.  Note  that  under  TLS 1.3, it is recommended for clients to use
26       session parameters only once, to prevent passive-observers from  corre‐
27       lating the different connections.
28
29       The   returned    data   are  allocated  and  must  be  released  using
30       gnutls_free().
31
32       This function will fail if called prior  to  handshake  completion.  In
33       case  of  false start TLS, the handshake completes only after data have
34       been successfully received from the peer.
35
36       Under TLS1.3 session resumption is possible only after a session ticket
37       is  received  by  the  client.  To  ensure  that such a ticket has been
38       received   use   gnutls_session_get_flags()   and   check   for    flag
39       GNUTLS_SFLAGS_SESSION_TICKET;  if  this  flag is not set, this function
40       will wait for a new ticket within an estimated  rountrip,  and  if  not
41       received will return dummy data which cannot lead to resumption.
42
43       To  get  notified  when  new  tickets  are  received  by the server use
44       gnutls_handshake_set_hook_function()   to   wait    for    GNUTLS_HAND‐
45       SHAKE_NEW_SESSION_TICKET    messages.    Each   call   of   gnutls_ses‐
46       sion_get_data2() after  a  ticket  is  received,  will  return  session
47       resumption data corresponding to the last received ticket.
48

RETURNS

50       On  success,  GNUTLS_E_SUCCESS (0) is returned, otherwise an error code
51       is returned.
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: https://www.gnutls.org
56
57
59       Copyright © 2001-2019 Free Software Foundation, Inc., and others.
60       Copying and distribution of this file, with  or  without  modification,
61       are  permitted  in  any  medium  without royalty provided the copyright
62       notice and this notice are preserved.
63

SEE ALSO

65       The full documentation for gnutls is maintained as  a  Texinfo  manual.
66       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
67       visit
68
69       https://www.gnutls.org/manual/
70
71gnutls                               3.6.8         gnutls_session_get_data2(3)
Impressum