mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-14 15:17:49 +00:00
Update tests to reflect change to lenght checking
Signed-off-by: Ben Taylor <[email protected]> (cherry picked from commit f650b3f761ff5d88c94800d168b1889567106eec)
This commit is contained in:
@@ -6369,7 +6369,13 @@ void aead_multipart_state_test(int key_type_arg, data_t *key_data,
|
||||
|
||||
if (operation.alg == PSA_ALG_GCM) {
|
||||
TEST_EQUAL(psa_aead_set_lengths(&operation, additional_data->len,
|
||||
0xfffffffe * 64 + 1),
|
||||
(size_t) 0xfffffffe * 64 + 1),
|
||||
PSA_ERROR_INVALID_ARGUMENT);
|
||||
TEST_EQUAL(psa_aead_set_nonce(&operation, nonce->x, nonce->len),
|
||||
PSA_ERROR_BAD_STATE);
|
||||
} else if (operation.alg == PSA_ALG_CHACHA20_POLY1305) {
|
||||
TEST_EQUAL(psa_aead_set_lengths(&operation, additional_data->len,
|
||||
SIZE_MAX),
|
||||
PSA_ERROR_INVALID_ARGUMENT);
|
||||
TEST_EQUAL(psa_aead_set_nonce(&operation, nonce->x, nonce->len),
|
||||
PSA_ERROR_BAD_STATE);
|
||||
|
||||
Reference in New Issue
Block a user