1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

mbedtls_test_read_mpi_core: allow odd number of hex digits

Test functions must now take a char* argument rather than data_t*. This does
not affect existing test data.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2022-10-09 21:14:09 +02:00
parent 1b5c85c75b
commit c5772a194e
4 changed files with 38 additions and 10 deletions

View File

@ -298,12 +298,13 @@ void mbedtls_test_err_add_check( int high, int low,
* of limbs is 0.
* \param[out] plimbs The address where the number of limbs will be stored.
* \param[in] input The test argument to read.
* It is interpreted as a big-endian integer in base 256.
* It is interpreted as a hexadecimal representation
* of a non-negative integer.
*
* \return \c 0 on success, an \c MBEDTLS_ERR_MPI_xxx error code otherwise.
*/
int mbedtls_test_read_mpi_core( mbedtls_mpi_uint **pX, size_t *plimbs,
const data_t *input );
const char *input );
/** Read an MPI from a hexadecimal string.
*