From f96e9775843ac37e721365c52d8ed7dec71bd08c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 5 Apr 2022 16:32:07 +0200 Subject: [PATCH] No need to recalculate iv_length Signed-off-by: Gilles Peskine --- tests/src/psa_exercise_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c index 3d2dfc69a..415f8852c 100644 --- a/tests/src/psa_exercise_key.c +++ b/tests/src/psa_exercise_key.c @@ -181,7 +181,7 @@ static int exercise_cipher_key( mbedtls_svc_key_id_t key, if( usage & PSA_KEY_USAGE_ENCRYPT ) { PSA_ASSERT( psa_cipher_encrypt_setup( &operation, key, alg ) ); - if( PSA_CIPHER_IV_LENGTH( key_type, alg ) != 0 ) + if( iv_length != 0 ) { PSA_ASSERT( psa_cipher_generate_iv( &operation, iv, sizeof( iv ),