1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Test consistency of cipher max-size macros

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2023-06-14 17:34:31 +02:00
parent f07612d02e
commit 4f4d4b2c40
2 changed files with 5 additions and 0 deletions

View File

@@ -63,6 +63,9 @@ static int check_cipher_info(mbedtls_cipher_type_t type,
key_bitlen == 192 ||
key_bitlen == 256);
}
TEST_LE_U(key_bitlen, MBEDTLS_MAX_KEY_LENGTH * 8);
TEST_LE_U(block_size, MBEDTLS_MAX_BLOCK_LENGTH);
TEST_LE_U(iv_size, MBEDTLS_MAX_IV_LENGTH);
if (strstr(info->name, "-ECB") != NULL) {
TEST_ASSERT(iv_size == 0);