Simplify PSA transform->ivlen set in ssl_tls12_populate_transform()

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-04-27 10:36:14 +02:00
parent 3bf040ed70
commit 2230e6c06d

View File

@ -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 */