mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 14:44:14 +01:00
Initialize status with CORRUPTION_DETECTED and update fallthrough
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
5adf52c72d
commit
0eeb794a2e
@ -1080,7 +1080,7 @@ psa_status_t psa_driver_wrapper_hash_compute(
|
|||||||
size_t hash_size,
|
size_t hash_size,
|
||||||
size_t *hash_length)
|
size_t *hash_length)
|
||||||
{
|
{
|
||||||
psa_status_t status = PSA_ERROR_NOT_SUPPORTED;
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
|
||||||
/* Try accelerators first */
|
/* Try accelerators first */
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
@ -1097,8 +1097,7 @@ psa_status_t psa_driver_wrapper_hash_compute(
|
|||||||
if( status != PSA_ERROR_NOT_SUPPORTED )
|
if( status != PSA_ERROR_NOT_SUPPORTED )
|
||||||
return( status );
|
return( status );
|
||||||
#endif
|
#endif
|
||||||
if( status == PSA_ERROR_NOT_SUPPORTED )
|
(void) status;
|
||||||
{
|
|
||||||
(void) alg;
|
(void) alg;
|
||||||
(void) input;
|
(void) input;
|
||||||
(void) input_length;
|
(void) input_length;
|
||||||
@ -1108,14 +1107,12 @@ psa_status_t psa_driver_wrapper_hash_compute(
|
|||||||
|
|
||||||
return( PSA_ERROR_NOT_SUPPORTED );
|
return( PSA_ERROR_NOT_SUPPORTED );
|
||||||
}
|
}
|
||||||
return( status );
|
|
||||||
}
|
|
||||||
|
|
||||||
psa_status_t psa_driver_wrapper_hash_setup(
|
psa_status_t psa_driver_wrapper_hash_setup(
|
||||||
psa_hash_operation_t *operation,
|
psa_hash_operation_t *operation,
|
||||||
psa_algorithm_t alg )
|
psa_algorithm_t alg )
|
||||||
{
|
{
|
||||||
psa_status_t status = PSA_ERROR_NOT_SUPPORTED;
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
|
||||||
/* Try setup on accelerators first */
|
/* Try setup on accelerators first */
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
|
Loading…
Reference in New Issue
Block a user