1=pod 2 3=head1 NAME 4 5SSL_set_num_tickets, 6SSL_get_num_tickets, 7SSL_CTX_set_num_tickets, 8SSL_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 22SSL_CTX_set_num_tickets() and SSL_set_num_tickets() can be called for a server 23application and set the number of TLSv1.3 session tickets that will be sent to 24the client after a full handshake. Set the desired value (which could be 0) in 25the B<num_tickets> argument. Typically these functions should be called before 26the start of the handshake. 27 28The default number of tickets is 2. Following a resumption the number of tickets 29issued will never be more than 1 regardless of the value set via 30SSL_set_num_tickets() or SSL_CTX_set_num_tickets(). If B<num_tickets> is set to 310 then no tickets will be issued for either a normal connection or a resumption. 32 33Tickets are also issued on receipt of a post-handshake certificate from the 34client following a request by the server using 35L<SSL_verify_client_post_handshake(3)>. These new tickets will be associated 36with the updated client identity (i.e. including their certificate and 37verification status). The number of tickets issued will normally be the same as 38was used for the initial handshake. If the initial handshake was a full 39handshake then SSL_set_num_tickets() can be called again prior to calling 40SSL_verify_client_post_handshake() to update the number of tickets that will be 41sent. 42 43SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of 44tickets set by a previous call to SSL_CTX_set_num_tickets() or 45SSL_set_num_tickets(), or 2 if no such call has been made. 46 47=head1 RETURN VALUES 48 49SSL_CTX_set_num_tickets() and SSL_set_num_tickets() return 1 on success or 0 on 50failure. 51 52SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of tickets 53that have been previously set. 54 55=head1 HISTORY 56 57These functions were added in OpenSSL 1.1.1. 58 59=head1 COPYRIGHT 60 61Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved. 62 63Licensed under the OpenSSL license (the "License"). You may not use 64this file except in compliance with the License. You can obtain a copy 65in the file LICENSE in the source distribution or at 66L<https://www.openssl.org/source/license.html>. 67 68=cut 69