mbedtls_ecdh_get_params() function
This function sets up an ECDH context from an EC key. It is used by clients and servers in place of the ServerKeyEchange for static ECDH, and imports ECDH parameters from the EC key information of a certificate. \see ecp.h
Arguments
ctx
The ECDH context to set up. This must be initialized.
key
The EC key to use. This must be initialized.
side
Defines the source of the key. Possible values are: - #MBEDTLS_ECDH_OURS: The key is ours. - #MBEDTLS_ECDH_THEIRS: The key is that of the peer.
Return value
\c 0 on success. Another \c MBEDTLS_ERR_ECP_XXX error code on failure.