Skip to content

Commit

Permalink
Fix test_suite_md API violation
Browse files Browse the repository at this point in the history
Add a call to `mbedtls_md_starts()` in the `mbedtls_md_process()`
test, as it violates the API usage. Fixes Mbed-TLS#2227.

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
  • Loading branch information
Ron Eldor authored and tom-cosgrove-arm committed Mar 4, 2022
1 parent 23ea2c6 commit b6889d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/suites/test_suite_md.function
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void mbedtls_md_process( )
info = mbedtls_md_info_from_type( *md_type_ptr );
TEST_ASSERT( info != NULL );
TEST_ASSERT( mbedtls_md_setup( &ctx, info, 0 ) == 0 );
TEST_ASSERT( mbedtls_md_starts( &ctx ) == 0 );
TEST_ASSERT( mbedtls_md_process( &ctx, buf ) == 0 );
mbedtls_md_free( &ctx );
}
Expand Down

0 comments on commit b6889d1

Please sign in to comment.