SSL_set_connect_state(3) OpenSSL SSL_set_connect_state(3) NNAAMMEE SSL_set_connect_state, SSL_get_accept_state - prepare SSL object to work in client or server mode SSYYNNOOPPSSIISS #include void SSL_set_connect_state(SSL *ssl); void SSL_set_accept_state(SSL *ssl); DDEESSCCRRIIPPTTIIOONN _S_S_L___s_e_t___c_o_n_n_e_c_t___s_t_a_t_e_(_) sets ssssll to work in client mode. _S_S_L___s_e_t___a_c_c_e_p_t___s_t_a_t_e_(_) sets ssssll to work in server mode. NNOOTTEESS When the SSL_CTX object was created with _S_S_L___C_T_X___n_e_w(3), it was either assigned a dedicated client method, a dedicated server method, or a generic method, that can be used for both client and server connec- tions. (The method might have been changed with _S_S_L___C_T_X___s_e_t___s_s_l___v_e_r_- _s_i_o_n(3) or _S_S_L___s_e_t___s_s_l___m_e_t_h_o_d(3).) When beginning a new handshake, the SSL engine must know whether it must call the connect (client) or accept (server) routines. Even though it may be clear from the method chosen, whether client or server mode was requested, the handshake routines must be explicitly set. When using the _S_S_L___c_o_n_n_e_c_t(3) or _S_S_L___a_c_c_e_p_t(3) routines, the correct handshake routines are automatically set. When performing a transparent negotiation using _S_S_L___w_r_i_t_e(3) or _S_S_L___r_e_a_d(3), the handshake routines must be explicitly set in advance using either _S_S_L___s_e_t___c_o_n_n_e_c_t___s_t_a_t_e_(_) or _S_S_L___s_e_t___a_c_c_e_p_t___s_t_a_t_e_(_). RREETTUURRNN VVAALLUUEESS _S_S_L___s_e_t___c_o_n_n_e_c_t___s_t_a_t_e_(_) and _S_S_L___s_e_t___a_c_c_e_p_t___s_t_a_t_e_(_) do not return diag- nostic information. SSEEEE AALLSSOO _s_s_l(3), _S_S_L___n_e_w(3), _S_S_L___C_T_X___n_e_w(3), _S_S_L___c_o_n_n_e_c_t(3), _S_S_L___a_c_c_e_p_t(3), _S_S_L___w_r_i_t_e(3), _S_S_L___r_e_a_d(3), _S_S_L___d_o___h_a_n_d_s_h_a_k_e(3), _S_S_L___C_T_X___s_e_t___s_s_l___v_e_r_- _s_i_o_n(3) 1.0.2u 2019-12-20 SSL_set_connect_state(3)