Blame doc/manpages/gnutls_session_get_data2.3

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