2
0

SSL_CTX_flush_sessions.pod 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_flush_sessions - remove expired sessions
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
  7. =head1 DESCRIPTION
  8. SSL_CTX_flush_sessions() causes a run through the session cache of
  9. B<ctx> to remove sessions expired at time B<tm>.
  10. =head1 NOTES
  11. If enabled, the internal session cache will collect all sessions established
  12. up to the specified maximum number (see SSL_CTX_sess_set_cache_size()).
  13. As sessions will not be reused ones they are expired, they should be
  14. removed from the cache to save resources. This can either be done
  15. automatically whenever 255 new sessions were established (see
  16. L<SSL_CTX_set_session_cache_mode(3)>)
  17. or manually by calling SSL_CTX_flush_sessions().
  18. The parameter B<tm> specifies the time which should be used for the
  19. expiration test, in most cases the actual time given by time(0)
  20. will be used.
  21. SSL_CTX_flush_sessions() will only check sessions stored in the internal
  22. cache. When a session is found and removed, the remove_session_cb is however
  23. called to synchronize with the external cache (see
  24. L<SSL_CTX_sess_set_get_cb(3)>).
  25. =head1 RETURN VALUES
  26. SSL_CTX_flush_sessions() does not return a value.
  27. =head1 SEE ALSO
  28. L<ssl(7)>,
  29. L<SSL_CTX_set_session_cache_mode(3)>,
  30. L<SSL_CTX_set_timeout(3)>,
  31. L<SSL_CTX_sess_set_get_cb(3)>
  32. =head1 COPYRIGHT
  33. Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
  34. Licensed under the OpenSSL license (the "License"). You may not use
  35. this file except in compliance with the License. You can obtain a copy
  36. in the file LICENSE in the source distribution or at
  37. L<https://www.openssl.org/source/license.html>.
  38. =cut