SSL_SESSION_get_time.pod revision 167612
172613Skris=pod 272613Skris 372613Skris=head1 NAME 472613Skris 5167612SsimonSSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, SSL_SESSION_set_timeout - retrieve and manipulate session time and timeout settings 672613Skris 772613Skris=head1 SYNOPSIS 872613Skris 972613Skris #include <openssl/ssl.h> 1072613Skris 11160814Ssimon long SSL_SESSION_get_time(const SSL_SESSION *s); 1272613Skris long SSL_SESSION_set_time(SSL_SESSION *s, long tm); 13160814Ssimon long SSL_SESSION_get_timeout(const SSL_SESSION *s); 1472613Skris long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm); 1572613Skris 16160814Ssimon long SSL_get_time(const SSL_SESSION *s); 1772613Skris long SSL_set_time(SSL_SESSION *s, long tm); 18160814Ssimon long SSL_get_timeout(const SSL_SESSION *s); 1972613Skris long SSL_set_timeout(SSL_SESSION *s, long tm); 2072613Skris 2172613Skris=head1 DESCRIPTION 2272613Skris 2372613SkrisSSL_SESSION_get_time() returns the time at which the session B<s> was 2472613Skrisestablished. The time is given in seconds since the Epoch and therefore 2572613Skriscompatible to the time delivered by the time() call. 2672613Skris 2772613SkrisSSL_SESSION_set_time() replaces the creation time of the session B<s> with 2872613Skristhe chosen value B<tm>. 2972613Skris 3072613SkrisSSL_SESSION_get_timeout() returns the timeout value set for session B<s> 3172613Skrisin seconds. 3272613Skris 3372613SkrisSSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds 3472613Skristo B<tm>. 3572613Skris 3672613SkrisThe SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout() 3772613Skrisfunctions are synonyms for the SSL_SESSION_*() counterparts. 3872613Skris 3972613Skris=head1 NOTES 4072613Skris 4172613SkrisSessions are expired by examining the creation time and the timeout value. 4272613SkrisBoth are set at creation time of the session to the actual time and the 4372613Skrisdefault timeout value at creation, respectively, as set by 4472613SkrisL<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>. 4572613SkrisUsing these functions it is possible to extend or shorten the lifetime 4672613Skrisof the session. 4772613Skris 4872613Skris=head1 RETURN VALUES 4972613Skris 5072613SkrisSSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently 5172613Skrisvalid values. 5272613Skris 5372613SkrisSSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success. 5472613Skris 5572613SkrisIf any of the function is passed the NULL pointer for the session B<s>, 5672613Skris0 is returned. 5772613Skris 5872613Skris=head1 SEE ALSO 5972613Skris 6072613SkrisL<ssl(3)|ssl(3)>, 6189837SkrisL<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>, 6289837SkrisL<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)> 6372613Skris 6472613Skris=cut 65