1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

x509: remove unnecessary calls to psa_hash_abort

According to the documentation, it does not need to be called after a failed
psa_hash call.
This commit is contained in:
Andrzej Kurek
2018-11-19 13:57:58 -05:00
parent d4a6553191
commit a609337ca0
2 changed files with 2 additions and 7 deletions

View File

@ -1917,14 +1917,12 @@ static int x509_crt_check_signature( const mbedtls_x509_crt *child,
if( psa_hash_update( &hash_operation, child->tbs.p, child->tbs.len )
!= PSA_SUCCESS )
{
psa_hash_abort( &hash_operation );
return( -1 );
}
if( psa_hash_finish( &hash_operation, hash, sizeof( hash ), &hash_len )
!= PSA_SUCCESS )
{
psa_hash_abort( &hash_operation );
return( -1 );
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */