fix PSA_BLOCK_CIPHER_BLOCK_SIZE() argument in test code
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 0d056db..51e5419 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -108,9 +108,9 @@
if( usage & PSA_KEY_USAGE_DECRYPT )
{
psa_status_t status;
+ psa_key_type_t type = PSA_KEY_TYPE_NONE;
if( ! ( usage & PSA_KEY_USAGE_ENCRYPT ) )
{
- psa_key_type_t type;
size_t bits;
TEST_ASSERT( psa_get_key_information( key, &type, &bits ) );
iv_length = PSA_BLOCK_CIPHER_BLOCK_SIZE( type );
@@ -130,7 +130,7 @@
* if the input is some aribtrary data rather than an actual
ciphertext, a padding error is likely. */
if( ( usage & PSA_KEY_USAGE_DECRYPT ) ||
- PSA_BLOCK_CIPHER_BLOCK_SIZE( alg ) == 1 )
+ PSA_BLOCK_CIPHER_BLOCK_SIZE( type ) == 1 )
TEST_ASSERT( status == PSA_SUCCESS );
else
TEST_ASSERT( status == PSA_SUCCESS ||