mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-26 12:35:20 +00:00
Merge pull request #7124 from oberon-microsystems/fix-test-output-length-on-success-only
Fix test to check output length on PSA_SUCCESS only
This commit is contained in:
commit
ebb63420cc
@ -7853,7 +7853,11 @@ void asymmetric_encrypt(int key_type_arg,
|
||||
output, output_size,
|
||||
&output_length);
|
||||
TEST_EQUAL(actual_status, expected_status);
|
||||
TEST_EQUAL(output_length, expected_output_length);
|
||||
if (actual_status == PSA_SUCCESS) {
|
||||
TEST_EQUAL(output_length, expected_output_length);
|
||||
} else {
|
||||
TEST_LE_U(output_length, output_size);
|
||||
}
|
||||
|
||||
/* If the label is empty, the test framework puts a non-null pointer
|
||||
* in label->x. Test that a null pointer works as well. */
|
||||
@ -7868,7 +7872,11 @@ void asymmetric_encrypt(int key_type_arg,
|
||||
output, output_size,
|
||||
&output_length);
|
||||
TEST_EQUAL(actual_status, expected_status);
|
||||
TEST_EQUAL(output_length, expected_output_length);
|
||||
if (actual_status == PSA_SUCCESS) {
|
||||
TEST_EQUAL(output_length, expected_output_length);
|
||||
} else {
|
||||
TEST_LE_U(output_length, output_size);
|
||||
}
|
||||
}
|
||||
|
||||
exit:
|
||||
|
Loading…
x
Reference in New Issue
Block a user