1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-19 05:43:14 +03:00

Don't directly access iv_size

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman
2023-06-24 11:21:25 +01:00
parent 6c6c84212e
commit bb521fdbc9
5 changed files with 9 additions and 9 deletions

View File

@ -1142,7 +1142,7 @@ int mbedtls_test_ssl_build_transforms(mbedtls_ssl_transform *t_in,
/* Pick cipher */
cipher_info = mbedtls_cipher_info_from_type(cipher_type);
CHK(cipher_info != NULL);
CHK(cipher_info->iv_size <= 16);
CHK(mbedtls_cipher_info_get_iv_size(cipher_info) <= 16);
CHK(mbedtls_cipher_info_get_key_bitlen(cipher_info) % 8 == 0);
/* Pick keys */
@ -1273,7 +1273,7 @@ int mbedtls_test_ssl_build_transforms(mbedtls_ssl_transform *t_in,
/* Pick IV's (regardless of whether they
* are being used by the transform). */
ivlen = cipher_info->iv_size;
ivlen = mbedtls_cipher_info_get_iv_size(cipher_info);
memset(iv_enc, 0x3, sizeof(iv_enc));
memset(iv_dec, 0x4, sizeof(iv_dec));