pub unsafe extern "C" fn mbedtls_ssl_handshake_step(
    ssl: *mut mbedtls_ssl_context
) -> c_int
Expand description

\brief Perform a single step of the SSL handshake

\note The state of the context (ssl->state) will be at the next state after this function returns \c 0. Do not call this function if mbedtls_ssl_is_handshake_over() returns \c 1.

\warning Whilst in the past you may have used direct access to the context state (ssl->state) in order to ascertain when to stop calling this function and although you can still do so with something like ssl->MBEDTLS_PRIVATE(state) or by defining MBEDTLS_ALLOW_PRIVATE_ACCESS, this is now considered deprecated and could be broken in any future release. If you still find you have good reason for such direct access, then please do contact the team to explain this (raise an issue or post to the mailing list), so that we can add a solution to your problem that will be guaranteed to work in the future.

\param ssl SSL context

\return See mbedtls_ssl_handshake().

\warning If this function returns something other than \c 0, #MBEDTLS_ERR_SSL_WANT_READ, #MBEDTLS_ERR_SSL_WANT_WRITE, #MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS or #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS, you must stop using the SSL context for reading or writing, and either free it or call \c mbedtls_ssl_session_reset() on it before re-using it for a new connection; the current connection must be closed.