mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-26 12:15:44 +00:00
More informative message on invalid classification flags
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
e02263da34
commit
a5a800dce0
|
@ -60,8 +60,15 @@
|
||||||
* flag is the name of the classification macro without the PSA_ prefix. */
|
* flag is the name of the classification macro without the PSA_ prefix. */
|
||||||
#define KEY_LIFETIME_IS_VOLATILE ( 1u << 0 )
|
#define KEY_LIFETIME_IS_VOLATILE ( 1u << 0 )
|
||||||
|
|
||||||
#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \
|
#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \
|
||||||
TEST_ASSERT( PSA_##flag( alg ) == !! ( ( flags ) & flag ) )
|
do \
|
||||||
|
{ \
|
||||||
|
if( ( flags ) & ( flag ) ) \
|
||||||
|
TEST_ASSERT( PSA_##flag( alg ) ); \
|
||||||
|
else \
|
||||||
|
TEST_ASSERT( ! PSA_##flag( alg ) ); \
|
||||||
|
} \
|
||||||
|
while( 0 )
|
||||||
|
|
||||||
/* Check the parity of value.
|
/* Check the parity of value.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue