1=pod 2 3=head1 NAME 4 5SSL_CTX_flush_sessions - remove expired sessions 6 7=head1 SYNOPSIS 8 9 #include <openssl/ssl.h> 10 11 void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); 12 13=head1 DESCRIPTION 14 15SSL_CTX_flush_sessions() causes a run through the session cache of 16B<ctx> to remove sessions expired at time B<tm>. 17 18=head1 NOTES 19 20If enabled, the internal session cache will collect all sessions established 21up to the specified maximum number (see SSL_CTX_sess_set_cache_size()). 22As sessions will not be reused ones they are expired, they should be 23removed from the cache to save resources. This can either be done 24automatically whenever 255 new sessions were established (see 25L<SSL_CTX_set_session_cache_mode(3)>) 26or manually by calling SSL_CTX_flush_sessions(). 27 28The parameter B<tm> specifies the time which should be used for the 29expiration test, in most cases the actual time given by time(0) 30will be used. 31 32SSL_CTX_flush_sessions() will only check sessions stored in the internal 33cache. When a session is found and removed, the remove_session_cb is however 34called to synchronize with the external cache (see 35L<SSL_CTX_sess_set_get_cb(3)>). 36 37=head1 RETURN VALUES 38 39SSL_CTX_flush_sessions() does not return a value. 40 41=head1 SEE ALSO 42 43L<ssl(7)>, 44L<SSL_CTX_set_session_cache_mode(3)>, 45L<SSL_CTX_set_timeout(3)>, 46L<SSL_CTX_sess_set_get_cb(3)> 47 48=head1 COPYRIGHT 49 50Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. 51 52Licensed under the OpenSSL license (the "License"). You may not use 53this file except in compliance with the License. You can obtain a copy 54in the file LICENSE in the source distribution or at 55L<https://www.openssl.org/source/license.html>. 56 57=cut 58