Ensure configured module specific and application specific defines are used
[openssl.git] / doc / man3 / SSL_CTX_set_num_tickets.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_set_num_tickets,
6 SSL_get_num_tickets,
7 SSL_CTX_set_num_tickets,
8 SSL_CTX_get_num_tickets
9 - control the number of TLSv1.3 session tickets that are issued
10
11 =head1 SYNOPSIS
12
13  #include <openssl/ssl.h>
14
15  int SSL_set_num_tickets(SSL *s, size_t num_tickets);
16  size_t SSL_get_num_tickets(SSL *s);
17  int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
18  size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx);
19
20 =head1 DESCRIPTION
21
22 SSL_CTX_set_num_tickets() and SSL_set_num_tickets() can be called for a server
23 application and set the number of TLSv1.3 session tickets that will be sent to
24 the client after a full handshake. Set the desired value (which could be 0) in
25 the B<num_tickets> argument. Typically these functions should be called before
26 the start of the handshake.
27
28 The default number of tickets is 2; the default number of tickets sent following
29 a resumption handshake is 1 but this cannot be changed using these functions.
30 The number of tickets following a resumption handshake can be reduced to 0 using
31 custom session ticket callbacks (see L<SSL_CTX_set_session_ticket_cb(3)>).
32
33 Tickets are also issued on receipt of a post-handshake certificate from the
34 client following a request by the server using
35 L<SSL_verify_client_post_handshake(3)>. These new tickets will be associated
36 with the updated client identity (i.e. including their certificate and
37 verification status). The number of tickets issued will normally be the same as
38 was used for the initial handshake. If the initial handshake was a full
39 handshake then SSL_set_num_tickets() can be called again prior to calling
40 SSL_verify_client_post_handshake() to update the number of tickets that will be
41 sent.
42
43 SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of
44 tickets set by a previous call to SSL_CTX_set_num_tickets() or
45 SSL_set_num_tickets(), or 2 if no such call has been made.
46
47 =head1 RETURN VALUES
48
49 SSL_CTX_set_num_tickets() and SSL_set_num_tickets() return 1 on success or 0 on
50 failure.
51
52 SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of tickets
53 that have been previously set.
54
55 =head1 HISTORY
56
57 These functions were added in OpenSSL 1.1.1.
58
59 =head1 COPYRIGHT
60
61 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
62
63 Licensed under the Apache License 2.0 (the "License").  You may not use
64 this file except in compliance with the License.  You can obtain a copy
65 in the file LICENSE in the source distribution or at
66 L<https://www.openssl.org/source/license.html>.
67
68 =cut