Merge pull request #5603 from tom-cosgrove-arm/fix_test_md_api_violation-2.28

Backport 2.28: Fix test md api violation 2.28
This commit is contained in:
Dave Rodgman 2022-03-10 09:21:52 +00:00 committed by GitHub
commit 2f39f191e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,3 @@
Bugfix
* Fix API violation in mbedtls_md_process() test by adding a call to
mbedtls_md_starts(). Fixes #2227.

View file

@ -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 );
}