mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
ECDH: Fix whitespace and permission problems
This commit is contained in:
committed by
Janos Follath
parent
0082f9df6f
commit
ea24394c03
24
library/ecdh.c
Executable file → Normal file
24
library/ecdh.c
Executable file → Normal file
@ -220,20 +220,18 @@ int mbedtls_ecdh_setup( mbedtls_ecdh_context *ctx, mbedtls_ecp_group_id grp_id )
|
||||
switch( grp_id )
|
||||
{
|
||||
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
|
||||
case MBEDTLS_ECP_DP_CURVE25519:
|
||||
{
|
||||
ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
|
||||
ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
|
||||
ctx->grp_id = grp_id;
|
||||
return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
|
||||
}
|
||||
case MBEDTLS_ECP_DP_CURVE25519:
|
||||
ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
|
||||
ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
|
||||
ctx->grp_id = grp_id;
|
||||
return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
|
||||
#endif
|
||||
default:
|
||||
ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
|
||||
ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
|
||||
ctx->grp_id = grp_id;
|
||||
ecdh_init_internal( &ctx->ctx.mbed_ecdh );
|
||||
return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
|
||||
default:
|
||||
ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
|
||||
ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
|
||||
ctx->grp_id = grp_id;
|
||||
ecdh_init_internal( &ctx->ctx.mbed_ecdh );
|
||||
return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user