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