SSL_CTX_flush_sessions 3 2001-04-11 0.9.9-dev OpenSSL

NAME

SSL_CTX_flush_sessions, SSL_flush_sessions - remove expired sessions

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
 void SSL_flush_sessions(SSL_CTX *ctx, long tm);

DESCRIPTION

_S_S_L___C_T_X___f_l_u_s_h___s_e_s_s_i_o_n_s_(_) causes a run through the session cache of ccttxx to remove sessions expired at time ttmm.

_S_S_L___f_l_u_s_h___s_e_s_s_i_o_n_s_(_) is a synonym for _S_S_L___C_T_X___f_l_u_s_h___s_e_s_s_i_o_n_s_(_).

NOTES

If enabled, the internal session cache will collect all sessions established up to the specified maximum number (see _S_S_L___C_T_X___s_e_s_s___s_e_t___c_a_c_h_e___s_i_z_e_(_)). As sessions will not be reused ones they are expired, they should be removed from the cache to save resources. This can either be done automatically whenever 255 new sessions were established (see _S_S_L___C_T_X___s_e_t___s_e_s_s_i_o_n___c_a_c_h_e___m_o_d_e(3)) or manually by calling _S_S_L___C_T_X___f_l_u_s_h___s_e_s_s_i_o_n_s_(_).

The parameter ttmm specifies the time which should be used for the expiration test, in most cases the actual time given by _t_i_m_e(0) will be used.

_S_S_L___C_T_X___f_l_u_s_h___s_e_s_s_i_o_n_s_(_) will only check sessions stored in the internal cache. When a session is found and removed, the remove_session_cb is however called to synchronize with the external cache (see _S_S_L___C_T_X___s_e_s_s___s_e_t___g_e_t___c_b(3)).

RETURN VALUES

SEE ALSO

_s_s_l(3), _S_S_L___C_T_X___s_e_t___s_e_s_s_i_o_n___c_a_c_h_e___m_o_d_e(3), _S_S_L___C_T_X___s_e_t___t_i_m_e_o_u_t(3), _S_S_L___C_T_X___s_e_s_s___s_e_t___g_e_t___c_b(3)