mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
mbedtls_dhm_get_value parameter order: context first, output last
mbedtls_dhm_get_value can be seen as either a copy function or a getter function. Given the name and the semantics, it's more of a getter, even if it "gets" by doing a copy. Therefore, put the context first, and the selector next, leaving the output for last. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -3871,10 +3871,10 @@ int mbedtls_ssl_conf_dh_param_ctx( mbedtls_ssl_config *conf, mbedtls_dhm_context
|
||||
{
|
||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||
|
||||
if( ( ret = mbedtls_dhm_get_value( &conf->dhm_P, dhm_ctx,
|
||||
MBEDTLS_DHM_PARAM_P ) ) != 0 ||
|
||||
( ret = mbedtls_dhm_get_value( &conf->dhm_G, dhm_ctx,
|
||||
MBEDTLS_DHM_PARAM_G ) ) != 0 )
|
||||
if( ( ret = mbedtls_dhm_get_value( dhm_ctx, MBEDTLS_DHM_PARAM_P,
|
||||
&conf->dhm_P ) ) != 0 ||
|
||||
( ret = mbedtls_dhm_get_value( dhm_ctx, MBEDTLS_DHM_PARAM_G,
|
||||
&conf->dhm_G ) ) != 0 )
|
||||
{
|
||||
mbedtls_mpi_free( &conf->dhm_P );
|
||||
mbedtls_mpi_free( &conf->dhm_G );
|
||||
|
Reference in New Issue
Block a user