SSL_CTX_flush_sessions.pod 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_flush_sessions, SSL_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. void SSL_flush_sessions(SSL_CTX *ctx, long tm);
  8. =head1 DESCRIPTION
  9. SSL_CTX_flush_sessions() causes a run through the session cache of
  10. B<ctx> to remove sessions expired at time B<tm>.
  11. SSL_flush_sessions() is a synonym for SSL_CTX_flush_sessions().
  12. =head1 NOTES
  13. If enabled, the internal session cache will collect all sessions established
  14. up to the specified maximum number (see SSL_CTX_sess_set_cache_size()).
  15. As sessions will not be reused ones they are expired, they should be
  16. removed from the cache to save resources. This can either be done
  17. automatically whenever 255 new sessions were established (see
  18. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>)
  19. or manually by calling SSL_CTX_flush_sessions().
  20. The parameter B<tm> specifies the time which should be used for the
  21. expiration test, in most cases the actual time given by time(0)
  22. will be used.
  23. SSL_CTX_flush_sessions() will only check sessions stored in the internal
  24. cache. When a session is found and removed, the remove_session_cb is however
  25. called to synchronize with the external cache (see
  26. L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>).
  27. =head1 RETURN VALUES
  28. =head1 SEE ALSO
  29. L<ssl(3)|ssl(3)>,
  30. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
  31. L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
  32. L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>
  33. =cut