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