7 SSL_CTX_set_num_tickets,
8 SSL_CTX_get_num_tickets
9 - control the number of TLSv1.3 session tickets that are issued
13 #include <openssl/ssl.h>
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);
22 SSL_CTX_set_num_tickets() and SSL_set_num_tickets() can be called for a server
23 application and set the number of session tickets that will be sent to the
24 client after a full handshake. Set the desired value (which could be 0) in the
25 B<num_tickets> argument. Typically these functions should be called before the
26 start of the handshake.
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)>).
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
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.
49 SSL_CTX_set_num_tickets() and SSL_set_num_tickets() return 1 on success or 0 on
52 SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of tickets
53 that have been previously set.
57 These functions were added in OpenSSL 1.1.1.
61 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
63 Licensed under the OpenSSL license (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>.