SSL_CTX_set_quiet_shutdown 3 2005-04-23 0.9.9-dev OpenSSL

NAME

SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown - manipulate shutdown behaviour

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);
 int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);


 void SSL_set_quiet_shutdown(SSL *ssl, int mode);
 int SSL_get_quiet_shutdown(const SSL *ssl);

DESCRIPTION

_S_S_L___C_T_X___s_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) sets the "quiet shutdown" flag for ccttxx to be mmooddee. SSL objects created from ccttxx inherit the mmooddee valid at the time _S_S_L___n_e_w(3) is called. mmooddee may be 0 or 1.

_S_S_L___C_T_X___g_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) returns the "quiet shutdown" setting of ccttxx.

_S_S_L___s_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) sets the "quiet shutdown" flag for ssssll to be mmooddee. The setting stays valid until ssssll is removed with _S_S_L___f_r_e_e(3) or _S_S_L___s_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) is called again. It is not changed when _S_S_L___c_l_e_a_r(3) is called. mmooddee may be 0 or 1.

_S_S_L___g_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) returns the "quiet shutdown" setting of ssssll.

NOTES

Normally when a SSL connection is finished, the parties must send out "close notify" alert messages using _S_S_L___s_h_u_t_d_o_w_n(3) for a clean shutdown.

When setting the "quiet shutdown" flag to 1, _S_S_L___s_h_u_t_d_o_w_n(3) will set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. (_S_S_L___s_h_u_t_d_o_w_n(3) then behaves like _S_S_L___s_e_t___s_h_u_t_d_o_w_n(3) called with SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.) The session is thus considered to be shutdown, but no "close notify" alert is sent to the peer. This behaviour violates the TLS standard.

The default is normal shutdown behaviour as described by the TLS standard.

RETURN VALUES

_S_S_L___C_T_X___s_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) and _S_S_L___s_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) do not return diagnostic information.

_S_S_L___C_T_X___g_e_t___q_u_i_e_t___s_h_u_t_d_o_w_n_(_) and SSL_get_quiet_shutdown return the current setting.

SEE ALSO

_s_s_l(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___n_e_w(3), _S_S_L___c_l_e_a_r(3), _S_S_L___f_r_e_e(3)