mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
pkcs7.c: Do not ignore return value of mbedlts_md
CI was failing due to the return value of mbedtls_md being ignored. If this function does fail, return early and propogate the md error. Signed-off-by: Nick Child <nick.child@ibm.com>
This commit is contained in:
@@ -285,9 +285,10 @@ void pkcs7_verify_hash( char *pkcs7_file, char *crt, char *filetobesigned )
|
||||
|
||||
md_info = mbedtls_md_info_from_type( md_alg );
|
||||
|
||||
mbedtls_md( md_info, data, datalen, hash );
|
||||
res = mbedtls_md( md_info, data, datalen, hash );
|
||||
TEST_ASSERT( res == 0 );
|
||||
|
||||
res = mbedtls_pkcs7_signed_hash_verify( &pkcs7, &x509, hash, sizeof(hash));
|
||||
res = mbedtls_pkcs7_signed_hash_verify( &pkcs7, &x509, hash, sizeof(hash) );
|
||||
TEST_ASSERT( res == 0 );
|
||||
|
||||
exit:
|
||||
|
Reference in New Issue
Block a user