SSL_accept(3) OpenSSL SSL_accept(3) NNAAMMEE SSL_accept - wait for a TLS/SSL client to initiate a TLS/SSL handshake SSYYNNOOPPSSIISS #include int SSL_accept(SSL *ssl); DDEESSCCRRIIPPTTIIOONN _S_S_L___a_c_c_e_p_t_(_) waits for a TLS/SSL client to initiate the TLS/SSL hand- shake. The communication channel must already have been set and assigned to the ssssll by setting an underlying BBIIOO. NNOOTTEESS The behaviour of _S_S_L___a_c_c_e_p_t_(_) depends on the underlying BIO. If the underlying BIO is bblloocckkiinngg, _S_S_L___a_c_c_e_p_t_(_) will only return once the handshake has been finished or an error occurred. If the underlying BIO is nnoonn--bblloocckkiinngg, _S_S_L___a_c_c_e_p_t_(_) will also return when the underlying BIO could not satisfy the needs of _S_S_L___a_c_c_e_p_t_(_) to continue the handshake, indicating the problem by the return value -1. In this case a call to _S_S_L___g_e_t___e_r_r_o_r_(_) with the return value of _S_S_L___a_c_c_e_p_t_(_) will yield SSSSLL__EERRRROORR__WWAANNTT__RREEAADD or SSSSLL__EERRRROORR__WWAANNTT__WWRRIITTEE. The calling process then must repeat the call after taking appropriate action to satisfy the needs of _S_S_L___a_c_c_e_p_t_(_). The action depends on the underlying BIO. When using a non-blocking socket, nothing is to be done, but _s_e_l_e_c_t_(_) can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue. RREETTUURRNN VVAALLUUEESS The following return values can occur: 0 The TLS/SSL handshake was not successful but was shut down con- trolled and by the specifications of the TLS/SSL protocol. Call _S_S_L___g_e_t___e_r_r_o_r_(_) with the return value rreett to find out the reason. 1 The TLS/SSL handshake was successfully completed, a TLS/SSL connec- tion has been established. <0 The TLS/SSL handshake was not successful because a fatal error occurred either at the protocol level or a connection failure occurred. The shutdown was not clean. It can also occur of action is need to continue the operation for non-blocking BIOs. Call _S_S_L___g_e_t___e_r_r_o_r_(_) with the return value rreett to find out the reason. SSEEEE AALLSSOO _S_S_L___g_e_t___e_r_r_o_r(3), _S_S_L___c_o_n_n_e_c_t(3), _S_S_L___s_h_u_t_d_o_w_n(3), _s_s_l(3), _b_i_o(3), _S_S_L___s_e_t___c_o_n_n_e_c_t___s_t_a_t_e(3), _S_S_L___d_o___h_a_n_d_s_h_a_k_e(3), _S_S_L___C_T_X___n_e_w(3) 1.0.2u 2019-12-20 SSL_accept(3)