5 SSL_CTX_flush_sessions - remove expired sessions
9 #include <openssl/ssl.h>
11 void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
15 SSL_CTX_flush_sessions() causes a run through the session cache of
16 B<ctx> to remove sessions expired at time B<tm>.
20 If enabled, the internal session cache will collect all sessions established
21 up to the specified maximum number (see SSL_CTX_sess_set_cache_size()).
22 As sessions will not be reused ones they are expired, they should be
23 removed from the cache to save resources. This can either be done
24 automatically whenever 255 new sessions were established (see
25 L<SSL_CTX_set_session_cache_mode(3)>)
26 or manually by calling SSL_CTX_flush_sessions().
28 The parameter B<tm> specifies the time which should be used for the
29 expiration test, in most cases the actual time given by time(0)
32 SSL_CTX_flush_sessions() will only check sessions stored in the internal
33 cache. When a session is found and removed, the remove_session_cb is however
34 called to synchronize with the external cache (see
35 L<SSL_CTX_sess_set_get_cb(3)>).
39 SSL_CTX_flush_sessions() does not return a value.
44 L<SSL_CTX_set_session_cache_mode(3)>,
45 L<SSL_CTX_set_timeout(3)>,
46 L<SSL_CTX_sess_set_get_cb(3)>
50 Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
52 Licensed under the OpenSSL license (the "License"). You may not use
53 this file except in compliance with the License. You can obtain a copy
54 in the file LICENSE in the source distribution or at
55 L<https://www.openssl.org/source/license.html>.