mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
tests: Added test for mbedtls_ecdh_context_grp
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
@ -464,3 +464,20 @@ exit:
|
||||
mbedtls_ecp_keypair_free(&their_key);
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void ecdh_context_grp(int id)
|
||||
{
|
||||
mbedtls_ecdh_context srv;
|
||||
|
||||
mbedtls_ecdh_init(&srv);
|
||||
TEST_ASSERT(mbedtls_ecdh_setup(&srv, id) == 0);
|
||||
|
||||
/* Test the retrieved group id matches/*/
|
||||
TEST_ASSERT((int) mbedtls_ecdh_get_grp_id(&srv) == id);
|
||||
|
||||
exit:
|
||||
mbedtls_ecdh_free(&srv);
|
||||
|
||||
}
|
||||
/* END_CASE */
|
||||
|
Reference in New Issue
Block a user