Hanno Becker
59274d43cb
Remove unnecessary call to mbedtls_mpi_free() in MPI tests
2018-12-18 23:27:03 +00:00
Hanno Becker
b48e1aa846
Add separate test for mbedtls_mpi_free() accepting NULL
2018-12-18 23:25:01 +00:00
Jaeden Amero
ee427b26d4
tests: Backup config.h before modifying it
...
It's good to make a backup of config.h before modifying it, so that when
"cleanup" runs the next test has a clean default config.h to start from.
Fixes 840af0a9ae
("Add tests to all.sh for CHECK_PARAMS edge cases")
2018-12-18 21:14:28 +00:00
Hanno Becker
e118504a5f
Numerous minor improvements to bignum documentation
2018-12-18 18:12:13 +00:00
Hanno Becker
56b661cbf8
Add test that mbedtls_mpi_free() accepts NULL parameter
2018-12-18 18:12:13 +00:00
Hanno Becker
afb607b9db
Add tests for parameter validation in MPI module
2018-12-18 18:12:13 +00:00
Hanno Becker
d22df58a56
Add missing guards around SHA-1 tests
2018-12-18 17:02:03 +00:00
Hanno Becker
adc9b178ca
Minor improvements to DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
8c8a93c574
Test parameter validation for DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
4fbd4bf442
Fix guard in SHA-512 tests
2018-12-18 16:37:43 +00:00
Hanno Becker
36beb04fd5
Add tests or SHA-256 parameter validation
2018-12-18 16:31:06 +00:00
Hanno Becker
686c9a0e8d
Test SHA-512 parameter validation
2018-12-18 15:33:14 +00:00
Hanno Becker
a994b2379f
Test that xxx_free() functions accept NULL parameter
2018-12-18 15:30:30 +00:00
Hanno Becker
ae2ff02ff1
Add tests for ChaChaPoly parameter validation
...
Parameter validation was previously performed and tested unconditionally
for the ChaCha/Poly modules. This commit therefore only needs go guard the
existing tests accordingly and use the appropriate test macros for parameter
validation.
2018-12-18 15:30:30 +00:00
Hanno Becker
af05a90349
Test parameter validation in ECDSA module
2018-12-18 14:31:50 +00:00
Hanno Becker
491db772c3
Test parameter validation for ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
4c818483b2
Test parameter validation for ECDH module
2018-12-18 14:30:39 +00:00
Hanno Becker
b06f193d73
Add missing cases to RSA parameter validation test
2018-12-18 14:05:20 +00:00
Hanno Becker
05cf6dabb8
Add missing test for mbedtls_rsa_pkcs1_sign()
2018-12-18 13:38:05 +00:00
Hanno Becker
f04d923834
Test mbedtls_rsa_gen_key() with NULL ctx/RNG separately
2018-12-18 13:38:05 +00:00
Hanno Becker
71cd6c7ba9
Remove duplicate test in RSA parameter validation test
2018-12-18 13:38:05 +00:00
Hanno Becker
a7ee00225b
Test mbedtls_rsa_init() with invalid padding
2018-12-18 13:38:05 +00:00
Hanno Becker
046d2024c5
Test parameter validation for RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
57b684f9d1
Add separate test for xxx_free() functions in ECP module
2018-12-18 13:00:48 +00:00
Hanno Becker
12dff0352b
Test parameter validation for ECP module
2018-12-18 13:00:48 +00:00
Manuel Pégourié-Gonnard
488d9309fc
Fix unused param warnings in test function
2018-12-18 13:05:49 +01:00
Hanno Becker
0e24473b94
Test parameter validation in SHA-1 module
2018-12-18 11:37:28 +00:00
Manuel Pégourié-Gonnard
e55e103bfe
Fix off-by-one in iv_off check and add tests
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
ab6b9758d6
Improve constant naming in test functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
2bc535be86
Add parameter validation for AES-CTR
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
8e41eb7187
Add parameter validation for AES-OFB
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
1677cca54b
Add parameter validation for AES-CFB functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
191af1313a
Add param validation for mbedtls_aes_crypt_xts()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
3178d1a997
Add param validation for mbedtls_aes_crypt_cbc()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
1aca260571
Add parameter validation for mbedtls_aes_crypt_ecb()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
68e3dff3f1
Add parameter validation XTS setkey functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
af0c6cb9e0
Fix missing guard on XTS function in tests
2018-12-18 12:02:52 +01:00
Hanno Becker
6640b0d9a3
Undo deprecation of MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
2018-12-18 09:53:14 +00:00
Hanno Becker
938f9e9bdb
Undo deprecation of MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
...
Merging MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH and
MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH is an API break.
2018-12-18 09:50:57 +00:00
Gilles Peskine
3d2f949c86
Move the ARRAY_LENGTH macro to the common helpers file
2018-12-17 23:17:17 +01:00
Hanno Becker
d2f3a00062
Introduce single BLOWFISH error code for bad input data
...
Deprecate the old specific error codes
* MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH
* MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
2018-12-17 13:26:37 +00:00
Hanno Becker
4c029d09be
Introduce single CAMELLIA error code for bad input data
...
Deprecate the old specific error codes
* MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
* MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
2018-12-17 13:26:33 +00:00
Gilles Peskine
c8fff7b2e7
Declare test_suite_aes.ofb to CMake
2018-12-14 18:30:41 +01:00
Gilles Peskine
ac372cc687
Add a facility to skip running some test suites
...
With the build option SKIP_TEST_SUITES=..., the specified test suites
are built, but skipped when running tests. Usage:
make check SKIP_TEST_SUITES=timing,gcm
or
cmake -D SKIP_TEST_SUITES=timing,gcm ...
The list can be separated by any of space, comma or semicolon, and each
element can be a regular expression in ERE syntax except that "." stands
for itself. Skipping "foo" skips not only "foo" itself but also
any "foo.bar", but does not skip "foobar".
2018-12-14 18:29:28 +01:00
Gilles Peskine
15db850fe9
run-test-suites: update the documentation
...
Update the documentation to mention the optional verbosity level with -v.
Print the documentation on --help.
Die on an unsupported option.
2018-12-14 18:23:13 +01:00
Manuel Pégourié-Gonnard
e7306d30a9
Improve some documentation and ChangeLog entry
2018-12-13 09:45:49 +01:00
Gilles Peskine
1a76f3971c
Merge remote-tracking branch 'psa/pr/230' into feature-psa
...
Implement a key handle mechanism
2018-12-12 16:15:34 +01:00
Manuel Pégourié-Gonnard
a4251f4775
Test aes_free( NULL ) unconditionally
2018-12-12 12:04:51 +01:00
Manuel Pégourié-Gonnard
54e7f312d3
Make TEST_VALID_PARAM() available unconditionally
2018-12-12 11:56:09 +01:00
Gilles Peskine
76965bb678
Remove MBEDTLS_USE_PSA_CRYPTO tests from all.sh
...
This branch isn't expected to keep USE_PSA_CRYPTO working.
2018-12-12 10:48:06 +01:00