1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +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:
Gilles Peskine
2021-06-11 21:59:08 +02:00
parent cadd3d860e
commit e5702489f5
4 changed files with 13 additions and 13 deletions

View File

@ -134,9 +134,9 @@ size_t mbedtls_dhm_get_len( const mbedtls_dhm_context *ctx )
return( mbedtls_mpi_size( &ctx->P ) );
}
int mbedtls_dhm_get_value( mbedtls_mpi *dest,
const mbedtls_dhm_context *ctx,
mbedtls_dhm_parameter param )
int mbedtls_dhm_get_value( const mbedtls_dhm_context *ctx,
mbedtls_dhm_parameter param,
mbedtls_mpi *dest )
{
const mbedtls_mpi *src = NULL;
switch( param )