ECDH: Removed unnecessary calls to mbedtls_ecp_group_load in ECDH benchmark

This commit is contained in:
Christoph M. Wintersteiger 2019-02-15 19:04:26 +00:00 committed by Janos Follath
parent 46e76db8a5
commit 1d03d902bb

View file

@ -1026,13 +1026,6 @@ int main( int argc, char *argv[] )
CHECK_AND_CONTINUE( mbedtls_ecdh_setup( &ecdh_srv, curve_info->grp_id ) );
CHECK_AND_CONTINUE( mbedtls_ecdh_setup( &ecdh_cli, curve_info->grp_id ) );
#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
CHECK_AND_CONTINUE( mbedtls_ecp_group_load(&ecdh_srv.grp, curve_info->grp_id));
#else
if( ecdh_srv.var == MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0 )
CHECK_AND_CONTINUE( mbedtls_ecp_group_load( &ecdh_srv.ctx.mbed_ecdh.grp, curve_info->grp_id ));
#endif
mbedtls_snprintf( title, sizeof( title ), "ECDHE-%s", curve_info->name );
TIME_PUBLIC( title, "full handshake",
const unsigned char * p_srv = buf_srv;