mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
New function mbedtls_ecjpake_set_point_format
Use this instead of accessing the field directly. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -128,6 +128,20 @@ cleanup:
|
||||
return( ret );
|
||||
}
|
||||
|
||||
int mbedtls_ecjpake_set_point_format( mbedtls_ecjpake_context *ctx,
|
||||
int point_format )
|
||||
{
|
||||
switch( point_format )
|
||||
{
|
||||
case MBEDTLS_ECP_PF_UNCOMPRESSED:
|
||||
case MBEDTLS_ECP_PF_COMPRESSED:
|
||||
ctx->point_format = point_format;
|
||||
return( 0 );
|
||||
default:
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if context is ready for use
|
||||
*/
|
||||
|
Reference in New Issue
Block a user