mirror of
https://github.com/espressif/mbedtls.git
synced 2025-06-26 03:24:35 +08:00
Fix IAR statement is unreachable warning
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
90330a4a2d
commit
9329252620
@ -525,7 +525,13 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
|
|||||||
size_t key_buffer_size, psa_algorithm_t alg,
|
size_t key_buffer_size, psa_algorithm_t alg,
|
||||||
const uint8_t *hash, size_t hash_length )
|
const uint8_t *hash, size_t hash_length )
|
||||||
{
|
{
|
||||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
( void ) operation;
|
||||||
|
( void ) key_buffer;
|
||||||
|
( void ) key_buffer_size;
|
||||||
|
( void ) alg;
|
||||||
|
( void ) hash;
|
||||||
|
( void ) hash_length;
|
||||||
|
|
||||||
psa_key_location_t location =
|
psa_key_location_t location =
|
||||||
PSA_KEY_LIFETIME_GET_LOCATION(
|
PSA_KEY_LIFETIME_GET_LOCATION(
|
||||||
attributes->core.lifetime );
|
attributes->core.lifetime );
|
||||||
@ -558,18 +564,8 @@ static inline psa_status_t psa_driver_wrapper_sign_hash_start(
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
/* Key is declared with a lifetime not known to us */
|
/* Key is declared with a lifetime not known to us */
|
||||||
( void ) status;
|
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
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(
|
static inline psa_status_t psa_driver_wrapper_sign_hash_complete(
|
||||||
@ -625,8 +621,15 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
|
|||||||
const uint8_t *hash, size_t hash_length,
|
const uint8_t *hash, size_t hash_length,
|
||||||
const uint8_t *signature, size_t signature_length )
|
const uint8_t *signature, size_t signature_length )
|
||||||
{
|
{
|
||||||
|
( void ) operation;
|
||||||
|
( void ) key_buffer;
|
||||||
|
( void ) key_buffer_size;
|
||||||
|
( void ) alg;
|
||||||
|
( void ) hash;
|
||||||
|
( void ) hash_length;
|
||||||
|
( void ) signature;
|
||||||
|
( void ) signature_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 );
|
attributes->core.lifetime );
|
||||||
|
|
||||||
@ -660,20 +663,8 @@ static inline psa_status_t psa_driver_wrapper_verify_hash_start(
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
/* Key is declared with a lifetime not known to us */
|
/* Key is declared with a lifetime not known to us */
|
||||||
( void ) status;
|
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
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(
|
static inline psa_status_t psa_driver_wrapper_verify_hash_complete(
|
||||||
@ -2724,6 +2715,7 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
|
|||||||
case PSA_KEY_LOCATION_LOCAL_STORAGE:
|
case PSA_KEY_LOCATION_LOCAL_STORAGE:
|
||||||
/* Key is stored in the slot in export representation, so
|
/* Key is stored in the slot in export representation, so
|
||||||
* cycle through all known transparent accelerators */
|
* cycle through all known transparent accelerators */
|
||||||
|
status = PSA_ERROR_NOT_SUPPORTED;
|
||||||
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
|
||||||
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(PSA_CRYPTO_DRIVER_TEST)
|
||||||
status = mbedtls_test_transparent_pake_setup(
|
status = mbedtls_test_transparent_pake_setup(
|
||||||
@ -2741,9 +2733,8 @@ static inline psa_status_t psa_driver_wrapper_pake_setup(
|
|||||||
inputs );
|
inputs );
|
||||||
if( status == PSA_SUCCESS )
|
if( status == PSA_SUCCESS )
|
||||||
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID;
|
||||||
return status;
|
|
||||||
#endif
|
#endif
|
||||||
return( PSA_ERROR_NOT_SUPPORTED );
|
return status;
|
||||||
/* Add cases for opaque driver here */
|
/* Add cases for opaque driver here */
|
||||||
default:
|
default:
|
||||||
/* Key is declared with a lifetime not known to us */
|
/* Key is declared with a lifetime not known to us */
|
||||||
@ -2761,6 +2752,11 @@ static inline psa_status_t psa_driver_wrapper_pake_output(
|
|||||||
size_t output_size,
|
size_t output_size,
|
||||||
size_t *output_length )
|
size_t *output_length )
|
||||||
{
|
{
|
||||||
|
(void) step;
|
||||||
|
(void) output;
|
||||||
|
(void) output_size;
|
||||||
|
(void) output_length;
|
||||||
|
|
||||||
switch( operation->id )
|
switch( operation->id )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_PAKE)
|
#if defined(MBEDTLS_PSA_BUILTIN_PAKE)
|
||||||
@ -2778,10 +2774,6 @@ static inline psa_status_t psa_driver_wrapper_pake_output(
|
|||||||
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
#endif /* PSA_CRYPTO_DRIVER_TEST */
|
||||||
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
|
||||||
default:
|
default:
|
||||||
(void) step;
|
|
||||||
(void) output;
|
|
||||||
(void) output_size;
|
|
||||||
(void) output_length;
|
|
||||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user