Skip to content

Commit f093a3d

Browse files
committed
Use ecdh_setup instead of ecp_group_load
Align files with development to ensure the same state of repositories.
1 parent c470b6b commit f093a3d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/ssl_srv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,8 +3088,8 @@ static int ssl_prepare_server_key_exchange( mbedtls_ssl_context *ssl,
30883088

30893089
MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDHE curve: %s", (*curve)->name ) );
30903090

3091-
if( ( ret = mbedtls_ecp_group_load( &ssl->handshake->ecdh_ctx.grp,
3092-
(*curve)->grp_id ) ) != 0 )
3091+
if( ( ret = mbedtls_ecdh_setup( &ssl->handshake->ecdh_ctx,
3092+
(*curve)->grp_id ) ) != 0 )
30933093
{
30943094
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecp_group_load", ret );
30953095
return( ret );

tests/suites/test_suite_ecdh.function

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void ecdh_exchange( int id )
278278
mbedtls_ecdh_init( &cli );
279279
memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) );
280280

281-
TEST_ASSERT( mbedtls_ecp_group_load( &srv.grp, id ) == 0 );
281+
TEST_ASSERT( mbedtls_ecdh_setup( &srv, id ) == 0 );
282282

283283
memset( buf, 0x00, sizeof( buf ) ); vbuf = buf;
284284
TEST_ASSERT( mbedtls_ecdh_make_params( &srv, &len, buf, 1000,

0 commit comments

Comments
 (0)