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
49       Note that this function under TLS1.3 requires a callback to be set with
50       gnutls_transport_set_pull_timeout_function() for successful  operation.
51       There  was  a  bug before 3.6.10 which could make this function fail if
52       that callback was not set. On later versions if not set,  the  function
53       will  return  a  successful error code, but will return dummy data that
54       cannot lead to a resumption.
55

RETURNS

57       On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an  error  code
58       is returned.
59

REPORTING BUGS

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

SEE ALSO

72       The  full  documentation  for gnutls is maintained as a Texinfo manual.
73       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
74       visit
75
76       https://www.gnutls.org/manual/
77
78gnutls                              3.6.11         gnutls_session_get_data2(3)
Impressum