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
1 changed files with 10 additions and 13 deletions
|
@ -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;
|
||||||
|
@ -1107,15 +1106,13 @@ psa_status_t psa_driver_wrapper_hash_compute(
|
||||||
(void) hash_length;
|
(void) hash_length;
|
||||||
|
|
||||||
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…
Add table
Add a link
Reference in a new issue