From d1be7674a424cfa4bb8108d82920017d834442d4 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Mon, 4 Apr 2022 11:21:41 +0200 Subject: [PATCH] Use PSA_BLOCK_CIPHER_BLOCK_LENGTH instead of PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE in ssl_tls12_populate_transform() Signed-off-by: Neil Armstrong --- library/ssl_tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index de8949e2d..af8cbb270 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -7103,7 +7103,7 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform, ssl_mode == MBEDTLS_SSL_MODE_CBC_ETM ) { #if defined(MBEDTLS_USE_PSA_CRYPTO) - size_t block_size = PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE; + size_t block_size = PSA_BLOCK_CIPHER_BLOCK_LENGTH( key_type ); #else size_t block_size = cipher_info->block_size; #endif /* MBEDTLS_USE_PSA_CRYPTO */