k-stachowiak
516897a44a
Remove unnecessary parameter validation from the Cipher module
2018-12-19 17:34:58 +01:00
k-stachowiak
1a9df6bcb7
Improve style in the Cipher module
2018-12-19 17:34:58 +01:00
k-stachowiak
95070a8286
Make some cipher parameter validation unconditional
2018-12-19 17:34:58 +01:00
k-stachowiak
c29d94c7bf
Account for optional NULL buffer arguments in the Cipher module
2018-12-19 17:34:13 +01:00
k-stachowiak
a539070f82
Make all parameter validation tests optional
2018-12-19 17:34:13 +01:00
Krzysztof Stachowiak
e0215d7869
Add Cipher module parameter validation
2018-12-19 17:34:13 +01:00
k-stachowiak
21298a20c4
Improve parameter validation in mbedtls_gcm_free()
2018-12-19 17:32:19 +01:00
k-stachowiak
8ffc92a1e8
Add parameter validation for the GCM module
2018-12-19 17:30:38 +01:00
Hanno Becker
8ce11a323e
Minor improvements to bignum module
2018-12-19 16:18:52 +00:00
Gilles Peskine
ee3cfec3cc
PK sign/verify: hash=NULL is ok if md_alg=0 and hash_len=0
2018-12-19 17:11:44 +01:00
Gilles Peskine
159171b72a
PK parse/write: support keylen=0 correctly
...
A 0-length buffer for the key is a legitimate edge case. Ensure that
it works, even with buf=NULL. Document the key and keylen parameters.
There are already test cases for parsing an empty buffer. A subsequent
commit will add tests for writing to an empty buffer.
2018-12-19 17:03:28 +01:00
Hanno Becker
70ded3602c
Minor improvements to Camellia module and documentation
2018-12-19 13:42:05 +00:00
Gilles Peskine
1f19fa6f62
PK: Fix free(NULL) in library and tests
...
free() functions are documented as no-ops on NULL. Implement and test
this correctly.
2018-12-19 14:18:39 +01:00
Hanno Becker
541aa69de4
Implement parameter validation for Blowfish module
2018-12-19 12:52:59 +00:00
Hanno Becker
b54ae0bc0d
Implement parameter validation for ARIA module
2018-12-19 12:51:00 +00:00
Hanno Becker
ff62f44ad7
Remove duplicated parameter check in CAMELLIA module
2018-12-19 12:47:55 +00:00
Hanno Becker
b4b7fb7504
Implement parameter validation for CAMELLIA module
2018-12-19 12:47:55 +00:00
Hanno Becker
9994e0d7cf
Regenerate errors.c
2018-12-19 09:55:40 +00:00
Hanno Becker
d8e4f4a764
Regenerate errors.c
2018-12-19 09:54:55 +00:00
Hanno Becker
859522a31c
Regenerate errors.c
2018-12-19 09:54:14 +00:00
Hanno Becker
185e516309
Minor fixes to ECJPAKE parameter validation
2018-12-19 09:48:50 +00:00
Hanno Becker
b7a04a7851
Fix mbedtls_ecp_curve_info_from_name() for NULL input
2018-12-19 08:52:05 +00:00
Hanno Becker
80f71689ee
Add parameter validation to mbedtls_ecp_restart_init()
2018-12-19 08:51:52 +00:00
Simon Butcher
54b789aa74
Merge remote-tracking branch 'public/pr/2298' into development
2018-12-19 08:08:14 +00:00
Gilles Peskine
e97dc60b42
Implement parameter validation in pk, pkparse and pkwrite
...
Add checks for null pointers under MBEDTLS_CHECK_PARAMS.
In functions that perform operations with a context, only check if the
context pointer is non-null under MBEDTLS_CHECK_PARAMS. In the default
configuration, unconditionally dereference the context pointer.
In functions that query a context, support NULL as a
pointer-to-context argument, and return the same value as for a
context which has been initialized but not set up.
2018-12-19 00:55:36 +01:00
Hanno Becker
c81cfece8f
Minor fixes to parameter validation in ECDH module
2018-12-18 23:32:42 +00:00
Hanno Becker
a7634e8347
Fix wrong invocation of parameter validation macro in ECDH module
2018-12-18 18:45:00 +00:00
Hanno Becker
54c91dd235
Remove double semicolon from bignum.c
2018-12-18 18:12:13 +00:00
Hanno Becker
73d7d79bc1
Implement parameter validation for MPI module
2018-12-18 18:12:13 +00:00
Hanno Becker
38e15d49f3
Don't declare MBEDTLS-namespace identifiers in sha512.c
2018-12-18 17:54:00 +00:00
Hanno Becker
8d215e7130
Don't define MBEDTLS-namespace macros in sha256.c
2018-12-18 17:53:21 +00:00
Hanno Becker
039ccab243
Don't declare MBEDTLS-namespace macros in sha1.c
2018-12-18 17:52:14 +00:00
Hanno Becker
2f660d047d
Forbid passing NULL input buffers to RSA encryption routines
2018-12-18 17:07:30 +00:00
Hanno Becker
adc9b178ca
Minor improvements to DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
5c14ed6f86
Implement parameter validation for DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
ca6f4585c7
Fix parameter validation in SHA-512 module
2018-12-18 16:36:26 +00:00
Hanno Becker
596e014a06
Add validation is is224
argument in mbedtls_sha256_starts_ret()
2018-12-18 16:31:06 +00:00
Hanno Becker
230b4f4159
Fix definition of MBEDTLS_SHA256_VALIDATE[_RET] in sha256.c
2018-12-18 16:31:06 +00:00
Hanno Becker
236ea16c01
Fix wrong conditional in free() functions
2018-12-18 15:30:30 +00:00
Hanno Becker
e463c42902
Minor improvements
2018-12-18 15:30:30 +00:00
Hanno Becker
305e4e4f32
Implement parameter validation for ChaCha/Poly modules
2018-12-18 15:30:30 +00:00
Andres Amaya Garcia
863d483965
Add MBEDTLS_ERR_SHA512_BAD_INPUT_DATA to error.{h,c}
2018-12-18 15:06:39 +00:00
Andres Amaya Garcia
ba519b94a5
Add parameter validation to SHA-512 module
2018-12-18 15:06:39 +00:00
Hanno Becker
b86e684ed4
Move/remove param validation in mbedtls_rsa_rsaes_pkcs1_v15_encrypt
...
- The validity of the input and output parameters is checked by
parameter validation.
- A PRNG is required in public mode only (even though it's also
recommended in private mode), so move the check to the
corresponding branch.
2018-12-18 14:46:04 +00:00
Hanno Becker
319ae11ab3
Implement parameter validation in ECDSA module
2018-12-18 14:31:50 +00:00
Hanno Becker
71c8e1b8d8
Implement parameter validation in ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
91796d7471
Implement parameter validation in ECDH module
2018-12-18 14:30:39 +00:00
Hanno Becker
ddeeed7d1b
Implement parameter validation for RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
4f8e8e5805
Implement parameter validation for ECP module
2018-12-18 13:00:48 +00:00
Andres Amaya Garcia
9e76c0e77f
Add MBEDTLS_ERR_SHA256_BAD_INPUT_DATA to error.{h,c}
2018-12-18 11:41:20 +00:00