mbedtls_dhm_read_public() function
This function imports the raw public value of the peer.
Arguments
ctx
The DHM context to use. This must be initialized and have its DHM parameters set, e.g. via mbedtls_dhm_set_group(). It may or may not already have generated its own private key.
input
The input buffer containing the \c G^Y value of the peer. This must be a readable buffer of size \p ilen Bytes.
ilen
The size of the input buffer \p input in Bytes.
Return value
\c 0 on success. An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Notes
In a TLS handshake, this is the how the server imports the Client's public DHM key.
mbedtls_dhm_read_public() is called by 1 function and calls 3 functions:
![]()
mbedtls_dhm_read_public()
mbedtls_dhm_read_public():
![]()
mbedtls_dhm_read_public()