1=pod
2
3=head1 NAME
4
5SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, SSL_SESSION_set_timeout - retrieve and manipulate session time and timeout settings
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 long SSL_SESSION_get_time(const SSL_SESSION *s);
12 long SSL_SESSION_set_time(SSL_SESSION *s, long tm);
13 long SSL_SESSION_get_timeout(const SSL_SESSION *s);
14 long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm);
15
16 long SSL_get_time(const SSL_SESSION *s);
17 long SSL_set_time(SSL_SESSION *s, long tm);
18 long SSL_get_timeout(const SSL_SESSION *s);
19 long SSL_set_timeout(SSL_SESSION *s, long tm);
20
21=head1 DESCRIPTION
22
23SSL_SESSION_get_time() returns the time at which the session B<s> was
24established. The time is given in seconds since the Epoch and therefore
25compatible to the time delivered by the time() call.
26
27SSL_SESSION_set_time() replaces the creation time of the session B<s> with
28the chosen value B<tm>.
29
30SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
31in seconds.
32
33SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
34to B<tm>.
35
36The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
37functions are synonyms for the SSL_SESSION_*() counterparts.
38
39=head1 NOTES
40
41Sessions are expired by examining the creation time and the timeout value.
42Both are set at creation time of the session to the actual time and the
43default timeout value at creation, respectively, as set by
44L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>.
45Using these functions it is possible to extend or shorten the lifetime
46of the session.
47
48=head1 RETURN VALUES
49
50SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
51valid values.
52
53SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
54
55If any of the function is passed the NULL pointer for the session B<s>,
560 is returned.
57
58=head1 SEE ALSO
59
60L<ssl(3)|ssl(3)>,
61L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
62L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>
63
64=cut
65