2
0

SSL_CTX_set_timeout.pod 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_timeout, SSL_CTX_get_timeout - manipulate timeout values for session caching
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
  7. long SSL_CTX_get_timeout(SSL_CTX *ctx);
  8. =head1 DESCRIPTION
  9. SSL_CTX_set_timeout() sets the timeout for newly created sessions for
  10. B<ctx> to B<t>. The timeout value B<t> must be given in seconds.
  11. SSL_CTX_get_timeout() returns the currently set timeout value for B<ctx>.
  12. =head1 NOTES
  13. Whenever a new session is created, it is assigned a maximum lifetime. This
  14. lifetime is specified by storing the creation time of the session and the
  15. timeout value valid at this time. If the actual time is later than creation
  16. time plus timeout, the session is not reused.
  17. Due to this realization, all sessions behave according to the timeout value
  18. valid at the time of the session negotiation. Changes of the timeout value
  19. do not affect already established sessions.
  20. The expiration time of a single session can be modified using the
  21. L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)> family of functions.
  22. Expired sessions are removed from the internal session cache, whenever
  23. L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> is called, either
  24. directly by the application or automatically (see
  25. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>)
  26. The default value for session timeout is decided on a per protocol
  27. basis, see L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>.
  28. All currently supported protocols have the same default timeout value
  29. of 300 seconds.
  30. =head1 RETURN VALUES
  31. SSL_CTX_set_timeout() returns the previously set timeout value.
  32. SSL_CTX_get_timeout() returns the currently set timeout value.
  33. =head1 SEE ALSO
  34. L<ssl(3)|ssl(3)>,
  35. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
  36. L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>,
  37. L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>,
  38. L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>
  39. =cut