SSL_CTX_set_num_tickets.pod 2.4 KB

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