mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 16:55:37 +00:00
Add missing return value check in ECDSA test suite
The test case `ecdsa_det_test_vectors` from the ECDSA test suite called `mbedtls_md()` without checking its return value.
This commit is contained in:
parent
7a539a57d7
commit
ddf9d9645a
|
@ -121,7 +121,8 @@ void ecdsa_det_test_vectors( int id, char *d_str, int md_alg,
|
||||||
md_info = mbedtls_md_info_from_type( md_alg );
|
md_info = mbedtls_md_info_from_type( md_alg );
|
||||||
TEST_ASSERT( md_info != NULL );
|
TEST_ASSERT( md_info != NULL );
|
||||||
hlen = mbedtls_md_get_size( md_info );
|
hlen = mbedtls_md_get_size( md_info );
|
||||||
mbedtls_md( md_info, (const unsigned char *) msg, strlen( msg ), hash );
|
TEST_ASSERT( mbedtls_md( md_info, (const unsigned char *) msg,
|
||||||
|
strlen( msg ), hash ) == 0 );
|
||||||
|
|
||||||
TEST_ASSERT( mbedtls_ecdsa_sign_det( &grp, &r, &s, &d, hash, hlen, md_alg ) == 0 );
|
TEST_ASSERT( mbedtls_ecdsa_sign_det( &grp, &r, &s, &d, hash, hlen, md_alg ) == 0 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue