Correct some layout issues, convert all remaining tabs to appropriate amounts of...
[openssl.git] / doc / ssl / SSL_SESSION_get_time.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_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
23 SSL_SESSION_get_time() returns the time at which the session B<s> was
24 established. The time is given in seconds since the Epoch and therefore
25 compatible to the time delivered by the time() call.
26
27 SSL_SESSION_set_time() replaces the creation time of the session B<s> with
28 the chosen value B<tm>.
29
30 SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
31 in seconds.
32
33 SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
34 to B<tm>.
35
36 The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
37 functions are synonyms for the SSL_SESSION_*() counterparts.
38
39 =head1 NOTES
40
41 Sessions are expired by examining the creation time and the timeout value.
42 Both are set at creation time of the session to the actual time and the
43 default timeout value at creation, respectively, as set by
44 L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>.
45 Using these functions it is possible to extend or shorten the lifetime
46 of the session.
47
48 =head1 RETURN VALUES
49
50 SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
51 valid values.
52
53 SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
54
55 If any of the function is passed the NULL pointer for the session B<s>, 
56 0 is returned.
57
58 =head1 SEE ALSO
59
60 L<ssl(3)|ssl(3)>,
61 L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
62 L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>
63
64 =cut