No need to recalculate iv_length

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2022-04-20 20:58:04 +02:00
parent 913c01f978
commit b8bd61a6ed
+1 -1
View File
@@ -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 ),