From f093a3dc6133b61fee17658f06f32a64db207d44 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Fri, 1 Feb 2019 02:50:36 -0500 Subject: [PATCH] Use ecdh_setup instead of ecp_group_load Align files with development to ensure the same state of repositories. --- library/ssl_srv.c | 4 ++-- tests/suites/test_suite_ecdh.function | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 6f7a9aa86..8a90288ea 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -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 ); diff --git a/tests/suites/test_suite_ecdh.function b/tests/suites/test_suite_ecdh.function index a8a1c626f..20df55ba6 100644 --- a/tests/suites/test_suite_ecdh.function +++ b/tests/suites/test_suite_ecdh.function @@ -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,