SSL_free 3 2001-04-11 0.9.9-dev OpenSSL

NAME

SSL_free - free an allocated SSL structure

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 void SSL_free(SSL *ssl);

DESCRIPTION

_S_S_L___f_r_e_e_(_) decrements the reference count of ssssll, and removes the SSL structure pointed to by ssssll and frees up the allocated memory if the the reference count has reached 0.

NOTES

_S_S_L___f_r_e_e_(_) also calls the _f_r_e_e_(_)ing procedures for indirectly affected items, if applicable: the buffering BIO, the read and write BIOs, cipher lists specially created for this ssssll, the SSSSLL__SSEESSSSIIOONN. Do not explicitly free these indirectly freed up items before or after calling _S_S_L___f_r_e_e_(_), as trying to free things twice may lead to program failure.

The ssl session has reference counts from two users: the SSL object, for which the reference count is removed by _S_S_L___f_r_e_e_(_) and the internal session cache. If the session is considered bad, because _S_S_L___s_h_u_t_d_o_w_n(3) was not called for the connection and _S_S_L___s_e_t___s_h_u_t_d_o_w_n(3) was not used to set the SSL_SENT_SHUTDOWN state, the session will also be removed from the session cache as required by RFC2246.

RETURN VALUES

_S_S_L___f_r_e_e_(_) does not provide diagnostic information.

_S_S_L___n_e_w(3), _S_S_L___c_l_e_a_r(3), _S_S_L___s_h_u_t_d_o_w_n(3), _S_S_L___s_e_t___s_h_u_t_d_o_w_n(3), _s_s_l(3)