Blame doc/manpages/gnutls_session_get_data2.3

Packit aea12f
.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
Packit Service 991b93
.TH "gnutls_session_get_data2" 3 "3.6.14" "gnutls" "gnutls"
Packit aea12f
.SH NAME
Packit aea12f
gnutls_session_get_data2 \- API function
Packit aea12f
.SH SYNOPSIS
Packit aea12f
.B #include <gnutls/gnutls.h>
Packit aea12f
.sp
Packit aea12f
.BI "int gnutls_session_get_data2(gnutls_session_t " session ", gnutls_datum_t * " data ");"
Packit aea12f
.SH ARGUMENTS
Packit aea12f
.IP "gnutls_session_t session" 12
Packit aea12f
is a \fBgnutls_session_t\fP type.
Packit aea12f
.IP "gnutls_datum_t * data" 12
Packit aea12f
is a pointer to a datum that will hold the session.
Packit aea12f
.SH "DESCRIPTION"
Packit aea12f
Returns necessary parameters to support resumption. The client
Packit aea12f
should call this function and store the returned session data. A session
Packit aea12f
can be resumed later by calling \fBgnutls_session_set_data()\fP with the returned
Packit aea12f
data. Note that under TLS 1.3, it is recommended for clients to use
Packit aea12f
session parameters only once, to prevent passive\-observers from correlating
Packit aea12f
the different connections.
Packit aea12f
Packit aea12f
The returned  \fIdata\fP are allocated and must be released using \fBgnutls_free()\fP.
Packit aea12f
Packit aea12f
This function will fail if called prior to handshake completion. In
Packit aea12f
case of false start TLS, the handshake completes only after data have
Packit aea12f
been successfully received from the peer.
Packit aea12f
Packit aea12f
Under TLS1.3 session resumption is possible only after a session ticket
Packit aea12f
is received by the client. To ensure that such a ticket has been received use
Packit aea12f
\fBgnutls_session_get_flags()\fP and check for flag \fBGNUTLS_SFLAGS_SESSION_TICKET\fP;
Packit aea12f
if this flag is not set, this function will wait for a new ticket within
Packit aea12f
an estimated rountrip, and if not received will return dummy data which
Packit aea12f
cannot lead to resumption.
Packit aea12f
Packit aea12f
To get notified when new tickets are received by the server
Packit aea12f
use \fBgnutls_handshake_set_hook_function()\fP to wait for \fBGNUTLS_HANDSHAKE_NEW_SESSION_TICKET\fP
Packit aea12f
messages. Each call of \fBgnutls_session_get_data2()\fP after a ticket is
Packit aea12f
received, will return session resumption data corresponding to the last
Packit aea12f
received ticket.
Packit Service 991b93
Packit Service 991b93
Note that this function under TLS1.3 requires a callback to be set with
Packit Service 991b93
\fBgnutls_transport_set_pull_timeout_function()\fP for successful operation. There
Packit Service 991b93
was a bug before 3.6.10 which could make this function fail if that callback
Packit Service 991b93
was not set. On later versions if not set, the function will return a successful
Packit Service 991b93
error code, but will return dummy data that cannot lead to a resumption.
Packit aea12f
.SH "RETURNS"
Packit aea12f
On success, \fBGNUTLS_E_SUCCESS\fP (0) is returned, otherwise
Packit aea12f
an error code is returned.
Packit aea12f
.SH "REPORTING BUGS"
Packit aea12f
Report bugs to <bugs@gnutls.org>.
Packit aea12f
.br
Packit aea12f
Home page: https://www.gnutls.org
Packit aea12f
Packit aea12f
.SH COPYRIGHT
Packit Service 991b93
Copyright \(co 2001- Free Software Foundation, Inc., and others.
Packit aea12f
.br
Packit aea12f
Copying and distribution of this file, with or without modification,
Packit aea12f
are permitted in any medium without royalty provided the copyright
Packit aea12f
notice and this notice are preserved.
Packit aea12f
.SH "SEE ALSO"
Packit aea12f
The full documentation for
Packit aea12f
.B gnutls
Packit aea12f
is maintained as a Texinfo manual.
Packit aea12f
If the /usr/share/doc/gnutls/
Packit aea12f
directory does not contain the HTML form visit
Packit aea12f
.B
Packit aea12f
.IP https://www.gnutls.org/manual/
Packit aea12f
.PP