Gilles Peskine
e146e7dbae
Don't use TEST_VALID_PARAM with a value
...
TEST_VALID_PARAM is only for functions that return void. This commit
fixes the build with clang -Wunused-comparison.
2018-12-19 13:21:22 +01:00
Hanno Becker
1959535038
Add parameter validation test for mbedtls_ecp_check_pub_priv()
2018-12-19 08:52:08 +00:00
Hanno Becker
549e455a42
Add parameter validation test for mbedtls_ecp_gen_privkey()
2018-12-19 08:52:02 +00:00
Hanno Becker
0a4fa9b1fb
Add parameter validation test for mbedtls_ecp_check_budget()
2018-12-19 08:51:58 +00:00
Hanno Becker
807c107c3c
Fix typos in ECP test suite
2018-12-19 08:51:55 +00:00
Simon Butcher
54b789aa74
Merge remote-tracking branch 'public/pr/2298' into development
2018-12-19 08:08:14 +00:00
Gilles Peskine
78438e4109
Test parameter validation for pk, pkparse and pkwrite
2018-12-19 00:55:47 +01:00
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 840af0a9ae6b ("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
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
Manuel Pégourié-Gonnard
e7306d30a9
Improve some documentation and ChangeLog entry
2018-12-13 09:45:49 +01:00
Manuel Pégourié-Gonnard
a4251f4775
Test aes_free( NULL ) unconditionally
2018-12-12 12:04:51 +01:00