1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Merge pull request #8272 from daverodgman/iar-warnings

Fix IAR warnings
This commit is contained in:
Gilles Peskine
2023-09-29 13:11:03 +00:00
committed by GitHub
7 changed files with 24 additions and 40 deletions

View File

@ -527,9 +527,7 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
size_t key_buffer_size, psa_algorithm_t alg,
const uint8_t *hash, size_t hash_length )
{
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
psa_key_location_t location =
PSA_KEY_LIFETIME_GET_LOCATION(
psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(
attributes->core.lifetime );
switch( location )
@ -560,18 +558,8 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
default:
/* Key is declared with a lifetime not known to us */
( void ) status;
return( PSA_ERROR_INVALID_ARGUMENT );
}
( void ) operation;
( void ) key_buffer;
( void ) key_buffer_size;
( void ) alg;
( void ) hash;
( void ) hash_length;
return( status );
}
static inline psa_status_t psa_driver_wrapper_sign_hash_complete(
@ -627,8 +615,6 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
const uint8_t *hash, size_t hash_length,
const uint8_t *signature, size_t signature_length )
{
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(
attributes->core.lifetime );
@ -662,20 +648,8 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
default:
/* Key is declared with a lifetime not known to us */
( void ) status;
return( PSA_ERROR_INVALID_ARGUMENT );
}
( void ) operation;
( void ) key_buffer;
( void ) key_buffer_size;
( void ) alg;
( void ) hash;
( void ) hash_length;
( void ) signature;
( void ) signature_length;
return( status );
}
static inline psa_status_t psa_driver_wrapper_verify_hash_complete(
@ -2726,6 +2700,7 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
case PSA_KEY_LOCATION_LOCAL_STORAGE:
/* Key is stored in the slot in export representation, so
* cycle through all known transparent accelerators */
status = PSA_ERROR_NOT_SUPPORTED;
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
#if defined(PSA_CRYPTO_DRIVER_TEST)
status = mbedtls_test_transparent_pake_setup(
@ -2743,15 +2718,12 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
inputs );
if( status == PSA_SUCCESS )
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
return status;
#endif
return( PSA_ERROR_NOT_SUPPORTED );
return status;
/* Add cases for opaque driver here */
default:
/* Key is declared with a lifetime not known to us */
(void)operation;
(void)inputs;
(void)status;
return( PSA_ERROR_INVALID_ARGUMENT );
}
}