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

\brief Initiate an SSL renegotiation on the running connection. Client: perform the renegotiation right now. Server: request renegotiation, which will be performed during the next call to mbedtls_ssl_read() if honored by client.

\param ssl SSL context

\return 0 if successful, or any mbedtls_ssl_handshake() return value except #MBEDTLS_ERR_SSL_CLIENT_RECONNECT that can’t happen during a renegotiation.

\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.