]>
Commit | Line | Data |
---|---|---|
0bc6597d LJ |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
c952780c | 5 | SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, |
b31db505 | 6 | SSL_SESSION_set_timeout, |
3ba4dac6 | 7 | SSL_get_time, SSL_set_time, SSL_get_timeout, SSL_set_timeout |
c952780c | 8 | - retrieve and manipulate session time and timeout settings |
0bc6597d LJ |
9 | |
10 | =head1 SYNOPSIS | |
11 | ||
12 | #include <openssl/ssl.h> | |
13 | ||
c3e64028 | 14 | long SSL_SESSION_get_time(const SSL_SESSION *s); |
0bc6597d | 15 | long SSL_SESSION_set_time(SSL_SESSION *s, long tm); |
c3e64028 | 16 | long SSL_SESSION_get_timeout(const SSL_SESSION *s); |
0bc6597d LJ |
17 | long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm); |
18 | ||
c3e64028 | 19 | long SSL_get_time(const SSL_SESSION *s); |
0bc6597d | 20 | long SSL_set_time(SSL_SESSION *s, long tm); |
c3e64028 | 21 | long SSL_get_timeout(const SSL_SESSION *s); |
0bc6597d LJ |
22 | long SSL_set_timeout(SSL_SESSION *s, long tm); |
23 | ||
24 | =head1 DESCRIPTION | |
25 | ||
26 | SSL_SESSION_get_time() returns the time at which the session B<s> was | |
27 | established. The time is given in seconds since the Epoch and therefore | |
28 | compatible to the time delivered by the time() call. | |
29 | ||
30 | SSL_SESSION_set_time() replaces the creation time of the session B<s> with | |
31 | the chosen value B<tm>. | |
32 | ||
33 | SSL_SESSION_get_timeout() returns the timeout value set for session B<s> | |
34 | in seconds. | |
35 | ||
36 | SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds | |
37 | to B<tm>. | |
38 | ||
39 | The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout() | |
40 | functions are synonyms for the SSL_SESSION_*() counterparts. | |
41 | ||
42 | =head1 NOTES | |
43 | ||
44 | Sessions are expired by examining the creation time and the timeout value. | |
45 | Both are set at creation time of the session to the actual time and the | |
46 | default timeout value at creation, respectively, as set by | |
9b86974e | 47 | L<SSL_CTX_set_timeout(3)>. |
0bc6597d LJ |
48 | Using these functions it is possible to extend or shorten the lifetime |
49 | of the session. | |
50 | ||
51 | =head1 RETURN VALUES | |
52 | ||
53 | SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently | |
54 | valid values. | |
55 | ||
56 | SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success. | |
57 | ||
1bc74519 | 58 | If any of the function is passed the NULL pointer for the session B<s>, |
0bc6597d LJ |
59 | 0 is returned. |
60 | ||
61 | =head1 SEE ALSO | |
62 | ||
b97fdb57 | 63 | L<ssl(7)>, |
9b86974e RS |
64 | L<SSL_CTX_set_timeout(3)>, |
65 | L<SSL_get_default_timeout(3)> | |
0bc6597d | 66 | |
e2f92610 RS |
67 | =head1 COPYRIGHT |
68 | ||
69 | Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. | |
70 | ||
4746f25a | 71 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
72 | this file except in compliance with the License. You can obtain a copy |
73 | in the file LICENSE in the source distribution or at | |
74 | L<https://www.openssl.org/source/license.html>. | |
75 | ||
76 | =cut |