mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 08:37:25 +00:00
Remove dead code
Do explain why we don't test a smaller buffer in addition to testing the nominal size and a larger buffer. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
c9187c5866
commit
6d14c2b858
@ -50,16 +50,9 @@ void hash_valid_one_shot(int alg_arg, data_t *input,
|
|||||||
mbedtls_free(output);
|
mbedtls_free(output);
|
||||||
output = NULL;
|
output = NULL;
|
||||||
|
|
||||||
#if 0
|
/* We don't test with a smaller output buffer because this isn't
|
||||||
/* Smaller output buffer (does not have to work!) */
|
* guaranteed to work: the core must pass a sufficiently large
|
||||||
output_size = expected->len - 1;
|
* output buffer to the driver. */
|
||||||
ASSERT_ALLOC(output, output_size);
|
|
||||||
TEST_EQUAL(mbedtls_psa_hash_compute(alg, input->x, input->len,
|
|
||||||
output, output_size, &length),
|
|
||||||
PSA_ERROR_BUFFER_TOO_SMALL);
|
|
||||||
mbedtls_free(output);
|
|
||||||
output = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_free(output);
|
mbedtls_free(output);
|
||||||
@ -146,18 +139,9 @@ void hash_valid_multipart(int alg_arg,
|
|||||||
mbedtls_free(output);
|
mbedtls_free(output);
|
||||||
output = NULL;
|
output = NULL;
|
||||||
|
|
||||||
#if 0
|
/* We don't test with a smaller output buffer because this isn't
|
||||||
/* Smaller output buffer (does not have to work!) */
|
* guaranteed to work: the core must pass a sufficiently large
|
||||||
TEST_EQUAL(mbedtls_psa_hash_clone(&clone_more, &clone_end),
|
* output buffer to the driver. */
|
||||||
PSA_SUCCESS);
|
|
||||||
output_size = expected2->len - 1;
|
|
||||||
ASSERT_ALLOC(output, output_size);
|
|
||||||
TEST_EQUAL(mbedtls_psa_hash_finish(&clone_end,
|
|
||||||
output, output_size, &length),
|
|
||||||
PSA_ERROR_BUFFER_TOO_SMALL);
|
|
||||||
mbedtls_free(output);
|
|
||||||
output = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Nominal case again after an error in a cloned operation */
|
/* Nominal case again after an error in a cloned operation */
|
||||||
output_size = expected2->len;
|
output_size = expected2->len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user