Merge pull request #2229 from RonEld/fix_test_md_api_violation

Fix test md api violation
This commit is contained in:
Dave Rodgman 2022-03-10 09:21:47 +00:00 committed by GitHub
commit 73e91e13a6
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 );
}