mbedtls/tests/suites
Gilles Peskine 5226eb5cd3 Simplify parsing of integers in .datax files
In the .datax parser, since we're calling strtol() anyway, rely on it for
verification. This makes the .datax parser very slightly more
liberal (leading spaces and '+' are now accepted), and changes the
interpretation of numbers with leading zeros to octal.

Before, an argument like :0123: was parsed as decimal, but an argument like
:0123+1: was parsed as a C expression and hence the leading zero marked an
octal representation. Now, a leading zero is always interpreted according to
C syntax, namely indicating octal. There are no nonzero integer constants
with a leading zero in a .data file, so this does not affect existing test
cases.

In the .datax generator, allow negative arguments to be 'int' (before, they
were systematically treated as 'exp' even though they didn't need to be).

In the .datax parser, validate the range of integer constants. They have to
fit in int32_t. In the .datax generator, use 'exp' instead of 'int' for
integer constants that are out of range.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-26 19:40:02 +02:00
..
helpers.function Simplify parsing of integers in .datax files 2023-04-26 19:40:02 +02:00
host_test.function Simplify parsing of integers in .datax files 2023-04-26 19:40:02 +02:00
main_test.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_aes.cbc.data
test_suite_aes.cfb.data
test_suite_aes.ecb.data Move copy-context testing to an auxiliary function 2023-03-16 14:42:39 +01:00
test_suite_aes.function Fix use of arithmetic on void* 2023-03-16 21:39:47 +01:00
test_suite_aes.ofb.data
test_suite_aes.rest.data
test_suite_aes.xts.data
test_suite_alignment.data Improve parsing of test data 2022-12-01 13:31:20 +00:00
test_suite_alignment.function Code style 2023-04-13 15:34:43 +01:00
test_suite_aria.data
test_suite_aria.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_asn1parse.data Deprecate mbedtls_asn1_free_named_data() 2022-11-07 15:42:44 -05:00
test_suite_asn1parse.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_asn1write.data Fix copypasta in test data 2022-06-15 21:16:42 +02:00
test_suite_asn1write.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_base64.data
test_suite_base64.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_bignum.function Stop supporting non-canonical case in mpi_write_string test data 2023-04-26 19:38:40 +02:00
test_suite_bignum.misc.data Stop supporting non-canonical case in mpi_write_string test data 2023-04-26 19:38:40 +02:00
test_suite_bignum_core.function bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_core.misc.data bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_mod.function bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_mod.misc.data bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_mod_raw.data bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_mod_raw.function bignum: Removed merge scaffolding. 2023-04-05 16:13:11 +01:00
test_suite_bignum_random.data Fix representation of mod-random output 2022-12-20 20:28:02 +01:00
test_suite_bignum_random.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_camellia.data
test_suite_camellia.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_ccm.data Fix missing AES dependencies 2022-10-19 08:35:08 -04:00
test_suite_ccm.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_chacha20.data
test_suite_chacha20.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_chachapoly.data
test_suite_chachapoly.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_cipher.aes.data Fix test dependencies for cases that are PSA-based 2022-10-21 13:39:00 -04:00
test_suite_cipher.aria.data Fix missing padding dependencies 2022-10-19 08:35:08 -04:00
test_suite_cipher.camellia.data Fix missing padding dependencies 2022-10-19 08:35:08 -04:00
test_suite_cipher.ccm.data Fix test dependencies for cases that are PSA-based 2022-10-21 13:39:00 -04:00
test_suite_cipher.chacha20.data Modifies data files to match new test function name 2022-02-21 09:57:51 +00:00
test_suite_cipher.chachapoly.data Modifies data files to match new test function name 2022-02-21 09:57:51 +00:00
test_suite_cipher.des.data Fix missing padding dependencies 2022-10-19 08:35:08 -04:00
test_suite_cipher.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_cipher.gcm.data Fix test dependencies for cases that are PSA-based 2022-10-21 13:39:00 -04:00
test_suite_cipher.misc.data
test_suite_cipher.nist_kw.data
test_suite_cipher.null.data
test_suite_cipher.padding.data
test_suite_cmac.data Fix missing AES dependencies 2022-10-19 08:35:08 -04:00
test_suite_cmac.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_common.data Add tests for mbedtls_xor 2022-11-22 17:32:43 +00:00
test_suite_common.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_constant_time.data Test memcmp with differences starting after the first byte 2023-01-21 10:29:00 +00:00
test_suite_constant_time.function Fix warning with GCC 12 2023-02-21 16:31:56 +00:00
test_suite_constant_time_hmac.data SSL: use MD_CAN macros 2023-03-21 16:29:31 +01:00
test_suite_constant_time_hmac.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_ctr_drbg.data
test_suite_ctr_drbg.function Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
test_suite_debug.data solve disparities for ECP_LIGHT between ref/accel 2023-04-11 11:33:50 +02:00
test_suite_debug.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_des.data
test_suite_des.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_dhm.data test_suite_dhm: Add missing dependencies on MBEDTLS_PEM_PARSE_C 2022-10-11 20:57:21 +02:00
test_suite_dhm.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_ecdh.data
test_suite_ecdh.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_ecdsa.data OID + misc crypto: use MD_CAN and fix failures 2023-03-21 16:28:00 +01:00
test_suite_ecdsa.function Enable ECDSA-det in driver-only hashes component 2023-03-21 16:42:06 +01:00
test_suite_ecjpake.data mbedtls_ecp_point_read_binary from compressed fmt 2022-10-03 05:43:27 -04:00
test_suite_ecjpake.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_ecp.data Remove obsolete ecp_fix_negative function 2023-03-28 18:43:07 +02:00
test_suite_ecp.function test_suite_ecp: Refactored ecp_mod_p224k1 to alignt with ecp_mod_p192k1 2023-04-18 14:13:20 +01:00
test_suite_entropy.data
test_suite_entropy.function Use MD-light in entropy.c 2023-03-24 10:43:40 +01:00
test_suite_error.data
test_suite_error.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_gcm.aes128_de.data
test_suite_gcm.aes128_en.data Fix missing AES dependencies 2022-10-19 08:35:08 -04:00
test_suite_gcm.aes192_de.data
test_suite_gcm.aes192_en.data
test_suite_gcm.aes256_de.data
test_suite_gcm.aes256_en.data
test_suite_gcm.camellia.data
test_suite_gcm.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_gcm.misc.data
test_suite_hkdf.data Enable HKDF in driver-only hashes test 2023-03-21 16:42:05 +01:00
test_suite_hkdf.function Enable HKDF in driver-only hashes test 2023-03-21 16:42:05 +01:00
test_suite_hmac_drbg.function Enable HMAC-DRBG in driver-only hashes component 2023-03-21 16:42:05 +01:00
test_suite_hmac_drbg.misc.data Enable HMAC-DRBG in driver-only hashes component 2023-03-21 16:42:05 +01:00
test_suite_hmac_drbg.no_reseed.data Enable HMAC-DRBG in driver-only hashes component 2023-03-21 16:42:05 +01:00
test_suite_hmac_drbg.nopr.data Enable HMAC-DRBG in driver-only hashes component 2023-03-21 16:42:05 +01:00
test_suite_hmac_drbg.pr.data Enable HMAC-DRBG in driver-only hashes component 2023-03-21 16:42:05 +01:00
test_suite_lmots.data Fix file names in reproduction instructions in test data 2022-10-13 20:48:15 +02:00
test_suite_lmots.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_lms.data Fix instructions and test data for pyhsslms interop tests 2022-10-13 20:45:05 +02:00
test_suite_lms.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_md.data MD: use MD_CAN in test suite and check for parity 2023-03-21 16:29:31 +01:00
test_suite_md.function Make MD_PSA_INIT/DONE available to all suites 2023-03-21 16:28:00 +01:00
test_suite_md.psa.data MD: use MD_CAN in test suite and check for parity 2023-03-21 16:29:31 +01:00
test_suite_mdx.data
test_suite_mdx.function Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
test_suite_memory_buffer_alloc.data
test_suite_memory_buffer_alloc.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_mps.data
test_suite_mps.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_net.data
test_suite_net.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_nist_kw.data
test_suite_nist_kw.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_oid.data OID + misc crypto: use MD_CAN and fix failures 2023-03-21 16:28:00 +01:00
test_suite_oid.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pem.data PEM: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pem.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pk.data solve disparities for ECP_LIGHT between ref/accel 2023-04-11 11:33:50 +02:00
test_suite_pk.function test: fix remaining failures in test due to the ECP_LIGHT symbol 2023-04-11 11:33:50 +02:00
test_suite_pkcs1_v15.data RSA: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pkcs1_v15.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pkcs1_v21.data RSA: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pkcs1_v21.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pkcs5.data PKCS5: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pkcs5.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pkcs7.data X.509: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pkcs7.function Fix memory allocations in pkcs7_verify test 2023-04-04 09:07:10 +02:00
test_suite_pkcs12.data PKCS12: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_pkcs12.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_pkparse.data solve disparities for ECP_LIGHT between ref/accel 2023-04-11 11:33:50 +02:00
test_suite_pkparse.function solve disparities for ECP_LIGHT between ref/accel 2023-04-11 11:33:50 +02:00
test_suite_pkwrite.data test: fix extension in DER test files 2023-04-18 12:53:19 +02:00
test_suite_pkwrite.function test_suite_pkwrite: replace memcpy with memmove 2023-04-24 10:26:24 +02:00
test_suite_platform.data Adjust time delay tests to fix fails 2023-03-15 19:00:50 +08:00
test_suite_platform.function Adjust time delay tests to fix fails 2023-03-15 19:00:50 +08:00
test_suite_platform_printf.data Exercise string parsing in the test framework 2023-04-26 19:40:02 +02:00
test_suite_platform_printf.function Exercise string parsing in the test framework 2023-04-26 19:40:02 +02:00
test_suite_platform_util.data Add tests that cover msan explicit_bzero issue 2023-03-16 12:02:15 +00:00
test_suite_platform_util.function Add explanatory comment 2023-03-16 13:43:32 +00:00
test_suite_poly1305.data
test_suite_poly1305.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto.data psa: fix ECP guards for key derivation 2023-04-11 11:33:50 +02:00
test_suite_psa_crypto.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_psa_crypto_attributes.data
test_suite_psa_crypto_attributes.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_driver_wrappers.data test: disable all RSA algs and fix tests 2023-04-03 08:26:35 +02:00
test_suite_psa_crypto_driver_wrappers.function psa: Remove MBEDTLS_PSA_CRYPTO_DRIVERS configuration option 2023-03-31 09:07:54 +02:00
test_suite_psa_crypto_entropy.data Redo of PR#5345. Fixed spelling and typographical errors found by CodeSpell. 2022-05-11 21:25:51 +01:00
test_suite_psa_crypto_entropy.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_generate_key.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_hash.data
test_suite_psa_crypto_hash.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_init.data
test_suite_psa_crypto_init.function Use MD-light in entropy.c 2023-03-24 10:43:40 +01:00
test_suite_psa_crypto_metadata.data Add metadata test case for PSA_ALG_TLS12_ECJPAKE_TO_PMS 2023-01-19 12:11:20 +01:00
test_suite_psa_crypto_metadata.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_not_supported.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_not_supported.misc.data
test_suite_psa_crypto_op_fail.function Enable all keys for interruptible op fail tests 2023-03-02 16:03:43 +00:00
test_suite_psa_crypto_op_fail.misc.data Test attempts to use a public key for a private-key operation 2022-04-05 15:02:44 +02:00
test_suite_psa_crypto_pake.data Add tests case for step with different buffer size 2023-03-23 08:06:09 +01:00
test_suite_psa_crypto_pake.function Add tests case for step with different buffer size 2023-03-23 08:06:09 +01:00
test_suite_psa_crypto_persistent_key.data test: remove dependencies on PK_WRITE and PK_PARSE from test_suite_psa_crypto suites 2023-03-08 11:03:09 +01:00
test_suite_psa_crypto_persistent_key.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_se_driver_hal.data test: driver-only: fix disparities in psa_crypto_se_driver_hal 2023-01-25 11:30:46 +01:00
test_suite_psa_crypto_se_driver_hal.function Manually fix two remaining instances of old macros 2023-03-24 10:43:40 +01:00
test_suite_psa_crypto_se_driver_hal_mocks.data
test_suite_psa_crypto_se_driver_hal_mocks.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_slot_management.data
test_suite_psa_crypto_slot_management.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_storage_format.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_psa_crypto_storage_format.misc.data
test_suite_psa_its.data BUGFIX: PSA test vectors use UID 1 instead of 0. 2022-02-08 15:19:26 +01:00
test_suite_psa_its.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_random.data Fix instances of old feature macros being used 2023-03-24 10:43:40 +01:00
test_suite_random.function Fix failures in test_suite_random 2023-03-24 10:43:40 +01:00
test_suite_rsa.data RSA: use MD_CAN macros 2023-03-21 16:28:00 +01:00
test_suite_rsa.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00
test_suite_shax.data test: sha: test SHA224 and SHA256 separately 2022-12-14 10:58:02 +01:00
test_suite_shax.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_ssl.data test: resolve remaining disparities in test_suite_ssl 2023-04-11 16:19:11 +02:00
test_suite_ssl.function solve disparities for ECP_LIGHT between ref/accel 2023-04-11 11:33:50 +02:00
test_suite_timing.data Remove the dependency on MBEDTLS_HAVE_TIME from MBEDTLS_TIMING_C 2022-04-08 04:41:42 -04:00
test_suite_timing.function Whitespace fix 2023-03-31 18:04:34 +01:00
test_suite_version.data Bump library, libcrypto and libx509 versions 2023-03-23 10:57:39 +00:00
test_suite_version.function Switch to the new code style 2023-01-11 14:50:10 +01:00
test_suite_x509parse.data Simplify string escapes 2023-04-26 19:39:54 +02:00
test_suite_x509parse.function Add mbedtls_x509_crt_parse_cn_inet_pton() tests 2023-04-11 08:29:42 -04:00
test_suite_x509write.data Simplify string escapes 2023-04-26 19:39:54 +02:00
test_suite_x509write.function Remove legacy_or_psa.h 2023-03-21 16:29:31 +01:00