Function esp_idf_svc::hal::sys::mbedtls_ecdh_read_params
source · pub unsafe extern "C" fn mbedtls_ecdh_read_params(
ctx: *mut mbedtls_ecdh_context,
buf: *mut *const u8,
end: *const u8,
) -> i32
Expand description
\brief This function parses the ECDHE parameters in a TLS ServerKeyExchange handshake message.
\note In a TLS handshake, this is the how the client sets up its ECDHE context from the server’s public ECDHE key material.
\see ecp.h
\param ctx The ECDHE context to use. This must be initialized. \param buf On input, \c *buf must be the start of the input buffer. On output, \c *buf is updated to point to the end of the data that has been read. On success, this is the first byte past the end of the ServerKeyExchange parameters. On error, this is the point at which an error has been detected, which is usually not useful except to debug failures. \param end The end of the input buffer.
\return \c 0 on success. \return An \c MBEDTLS_ERR_ECP_XXX error code on failure.