From b6889d1d6a0272d075a2db68d2c0dbe0fc1c2326 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Sun, 25 Nov 2018 15:10:38 +0200 Subject: [PATCH 1/2] Fix test_suite_md API violation Add a call to `mbedtls_md_starts()` in the `mbedtls_md_process()` test, as it violates the API usage. Fixes #2227. Signed-off-by: Tom Cosgrove --- tests/suites/test_suite_md.function | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/suites/test_suite_md.function b/tests/suites/test_suite_md.function index 8cbdbe4c7..8a3f82499 100644 --- a/tests/suites/test_suite_md.function +++ b/tests/suites/test_suite_md.function @@ -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 ); } From 928ae55ef429a628cd487cfe90096243016b1973 Mon Sep 17 00:00:00 2001 From: Tom Cosgrove Date: Fri, 4 Mar 2022 14:00:57 +0000 Subject: [PATCH 2/2] Add ChangeLog entry for fix to mbedtls_md_process() test Signed-off-by: Tom Cosgrove --- .../add-mbedtls_md_starts-to-mbedtls_md_process-test.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog.d/add-mbedtls_md_starts-to-mbedtls_md_process-test.txt diff --git a/ChangeLog.d/add-mbedtls_md_starts-to-mbedtls_md_process-test.txt b/ChangeLog.d/add-mbedtls_md_starts-to-mbedtls_md_process-test.txt new file mode 100644 index 000000000..57c7561d7 --- /dev/null +++ b/ChangeLog.d/add-mbedtls_md_starts-to-mbedtls_md_process-test.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix API violation in mbedtls_md_process() test by adding a call to + mbedtls_md_starts(). Fixes #2227.