From 2230e6c06df0643b9b45cf5dd0c096d5769408b1 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 27 Apr 2022 10:36:14 +0200 Subject: [PATCH] Simplify PSA transform->ivlen set in ssl_tls12_populate_transform() Signed-off-by: Neil Armstrong --- library/ssl_tls.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 217573453..ab1d9e4a2 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -7114,10 +7114,7 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform, /* IV length */ #if defined(MBEDTLS_USE_PSA_CRYPTO) - if( ssl_mode == MBEDTLS_SSL_MODE_STREAM ) - transform->ivlen = 0; - else - transform->ivlen = PSA_CIPHER_IV_LENGTH( key_type, alg ); + transform->ivlen = PSA_CIPHER_IV_LENGTH( key_type, alg ); #else transform->ivlen = cipher_info->iv_size; #endif /* MBEDTLS_USE_PSA_CRYPTO */