]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/SSL_SESSION_get_time.pod
Copyright year updates
[thirdparty/openssl.git] / doc / man3 / SSL_SESSION_get_time.pod
CommitLineData
0bc6597d
LJ
1=pod
2
3=head1 NAME
4
c952780c 5SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout,
ffc853bc 6SSL_SESSION_set_timeout, SSL_SESSION_get_time_ex, SSL_SESSION_set_time_ex,
3ba4dac6 7SSL_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
ffc853bc
IH
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
0bc6597d
LJ
27=head1 DESCRIPTION
28
29SSL_SESSION_get_time() returns the time at which the session B<s> was
30established. The time is given in seconds since the Epoch and therefore
31compatible to the time delivered by the time() call.
32
33SSL_SESSION_set_time() replaces the creation time of the session B<s> with
34the chosen value B<tm>.
35
36SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
37in seconds.
38
39SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
40to B<tm>.
41
ffc853bc
IH
42SSL_SESSION_get_time_ex() and SSL_SESSION_set_time_ex() extended functions use
43the time_t datatype instead of long to fix the Y2038 problem on systems with
4464 bit time_t type.
45
0bc6597d
LJ
46The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
47functions are synonyms for the SSL_SESSION_*() counterparts.
48
49=head1 NOTES
50
51Sessions are expired by examining the creation time and the timeout value.
52Both are set at creation time of the session to the actual time and the
53default timeout value at creation, respectively, as set by
9b86974e 54L<SSL_CTX_set_timeout(3)>.
0bc6597d
LJ
55Using these functions it is possible to extend or shorten the lifetime
56of the session.
57
58=head1 RETURN VALUES
59
60SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
61valid values.
62
63SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
64
1bc74519 65If any of the function is passed the NULL pointer for the session B<s>,
0bc6597d
LJ
660 is returned.
67
ffc853bc
IH
68=head1 BUGS
69
70The data type long is typically 32 bits on many systems, hence the old
71functions SSL_SESSION_get_time() and SSL_SESSION_set_time() are not always
72Y2038 safe.
73
0bc6597d
LJ
74=head1 SEE ALSO
75
b97fdb57 76L<ssl(7)>,
9b86974e
RS
77L<SSL_CTX_set_timeout(3)>,
78L<SSL_get_default_timeout(3)>
0bc6597d 79
e2f92610
RS
80=head1 COPYRIGHT
81
b6461792 82Copyright 2001-2024 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 83
4746f25a 84Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
85this file except in compliance with the License. You can obtain a copy
86in the file LICENSE in the source distribution or at
87L<https://www.openssl.org/source/license.html>.
88
89=cut