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
constunsignedchar*
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.
This function generates a DHM key pair and exports its public part together with the DHM parameters in the format used in a TLS ServerKeyExchange handshake message.