mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-27 18:05:45 +00:00
Remove superfluous check
As psa_mac_sign_finish / psa_mac_verify_finish already checks that the operation structure is valid (id is non-zero), the driver itself doesn't have to check for that anymore. If the operation has a driver ID assigned, it means that driver has returned success from its setup function, so the algorithm value will be set correctly. Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
e68bb52afd
commit
dba0644818
|
@ -452,8 +452,6 @@ static psa_status_t mac_finish_internal( mbedtls_psa_mac_operation_t *operation,
|
||||||
uint8_t *mac,
|
uint8_t *mac,
|
||||||
size_t mac_size )
|
size_t mac_size )
|
||||||
{
|
{
|
||||||
if( operation->alg == 0 )
|
|
||||||
return( PSA_ERROR_BAD_STATE );
|
|
||||||
if( mac_size < operation->mac_size )
|
if( mac_size < operation->mac_size )
|
||||||
return( PSA_ERROR_BUFFER_TOO_SMALL );
|
return( PSA_ERROR_BUFFER_TOO_SMALL );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue