mbedtls_dhm_read_params() function
This function parses the DHM parameters in a TLS ServerKeyExchange handshake message (DHM modulus, generator, and public key).
Arguments
ctx
The DHM context to use. This must be initialized.
p
On input, *p must be the start of the input buffer. On output, *p 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.
end
The end of the input buffer.
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 client sets up its DHM context from the server's public DHM key material.
mbedtls_dhm_read_params() is called by 1 function and calls 2 functions:
![]()
mbedtls_dhm_read_params()
mbedtls_dhm_read_params():
![]()
mbedtls_dhm_read_params()