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 50ms, and if not received will return
41       dummy  data  which  cannot lead to resumption. To get notified when new
42       tickets are received by the server use  gnutls_handshake_set_hook_func‐
43       tion()  to  wait for GNUTLS_HANDSHAKE_NEW_SESSION_TICKET messages. Each
44       call of gnutls_session_get_data2() after a  ticket  is  received,  will
45       return  session  resumption  data  corresponding  to  the last received
46       ticket.
47

RETURNS

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

REPORTING BUGS

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

SEE ALSO

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