Use ecdh_setup instead of ecp_group_load

Align files with development to ensure the same state of repositories.
This commit is contained in:
Andrzej Kurek 2019-02-01 02:50:36 -05:00
parent c470b6b021
commit f093a3dc61
2 changed files with 3 additions and 3 deletions

View file

@ -3088,8 +3088,8 @@ curve_matching_done:
MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDHE curve: %s", (*curve)->name ) );
if( ( ret = mbedtls_ecp_group_load( &ssl->handshake->ecdh_ctx.grp,
(*curve)->grp_id ) ) != 0 )
if( ( ret = mbedtls_ecdh_setup( &ssl->handshake->ecdh_ctx,
(*curve)->grp_id ) ) != 0 )
{
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecp_group_load", ret );
return( ret );

View file

@ -278,7 +278,7 @@ void ecdh_exchange( int id )
mbedtls_ecdh_init( &cli );
memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) );
TEST_ASSERT( mbedtls_ecp_group_load( &srv.grp, id ) == 0 );
TEST_ASSERT( mbedtls_ecdh_setup( &srv, id ) == 0 );
memset( buf, 0x00, sizeof( buf ) ); vbuf = buf;
TEST_ASSERT( mbedtls_ecdh_make_params( &srv, &len, buf, 1000,