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