1SSL_SESSION_GET_TIME(3ossl)         OpenSSL        SSL_SESSION_GET_TIME(3ossl)
2
3
4

NAME

6       SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout,
7       SSL_SESSION_set_timeout, SSL_get_time, SSL_set_time, SSL_get_timeout,
8       SSL_set_timeout - retrieve and manipulate session time and timeout
9       settings
10

SYNOPSIS

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

DESCRIPTION

25       SSL_SESSION_get_time() returns the time at which the session s was
26       established. The time is given in seconds since the Epoch and therefore
27       compatible to the time delivered by the time() call.
28
29       SSL_SESSION_set_time() replaces the creation time of the session s with
30       the chosen value tm.
31
32       SSL_SESSION_get_timeout() returns the timeout value set for session s
33       in seconds.
34
35       SSL_SESSION_set_timeout() sets the timeout value for session s in
36       seconds to tm.
37
38       The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and
39       SSL_set_timeout() functions are synonyms for the SSL_SESSION_*()
40       counterparts.
41

NOTES

43       Sessions are expired by examining the creation time and the timeout
44       value.  Both are set at creation time of the session to the actual time
45       and the default timeout value at creation, respectively, as set by
46       SSL_CTX_set_timeout(3).  Using these functions it is possible to extend
47       or shorten the lifetime of the session.
48

RETURN VALUES

50       SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the
51       currently valid values.
52
53       SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on
54       success.
55
56       If any of the function is passed the NULL pointer for the session s, 0
57       is returned.
58

SEE ALSO

60       ssl(7), SSL_CTX_set_timeout(3), SSL_get_default_timeout(3)
61
63       Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
64
65       Licensed under the Apache License 2.0 (the "License").  You may not use
66       this file except in compliance with the License.  You can obtain a copy
67       in the file LICENSE in the source distribution or at
68       <https://www.openssl.org/source/license.html>.
69
70
71
723.0.5                             2022-07-05       SSL_SESSION_GET_TIME(3ossl)
Impressum