Skip to content

Commit

Permalink
Add initialization for structures
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Mezei <[email protected]>
  • Loading branch information
gabor-mezei-arm committed Sep 28, 2022
1 parent 92ca1bc commit 1b5800d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/suites/test_suite_ecdsa.function
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ void ecdsa_invalid_param( )
size_t slen;
unsigned char buf[42] = { 0 };

mbedtls_ecdsa_init( &ctx );
mbedtls_ecp_keypair_init( &key );
mbedtls_ecp_group_init( &grp );
mbedtls_ecp_point_init( &P );
mbedtls_mpi_init( &m );

TEST_INVALID_PARAM( mbedtls_ecdsa_init( NULL ) );
TEST_VALID_PARAM( mbedtls_ecdsa_free( NULL ) );

Expand Down Expand Up @@ -200,6 +206,12 @@ void ecdsa_invalid_param( )
mbedtls_ecdsa_from_keypair( &ctx, NULL ) );

exit:
mbedtls_ecdsa_free( &ctx );
mbedtls_ecp_keypair_free( &key );
mbedtls_ecp_group_free( &grp );
mbedtls_ecp_point_free( &P );
mbedtls_mpi_free( &m );

return;
}
/* END_CASE */
Expand Down

0 comments on commit 1b5800d

Please sign in to comment.