Simon Butcher
1efda39f8a
Merge remote-tracking branch 'public/pr/2297' into development
2018-12-20 12:16:29 +00:00
Simon Butcher
5aa7809ac8
Merge remote-tracking branch 'public/pr/2275' into development
2018-12-20 12:15:19 +00:00
Simon Butcher
780cf189b0
Merge remote-tracking branch 'public/pr/2271' into development
2018-12-20 12:15:08 +00:00
Simon Butcher
032c037052
Merge remote-tracking branch 'public/pr/2270' into development
2018-12-20 12:04:13 +00:00
Simon Butcher
a033633bb0
Merge remote-tracking branch 'public/pr/2269' into development
2018-12-20 12:02:56 +00:00
Simon Butcher
70935a4001
Merge remote-tracking branch 'public/pr/2299' into development
2018-12-20 12:02:23 +00:00
Simon Butcher
003c0e032f
Merge remote-tracking branch 'public/pr/2292' into development
2018-12-20 12:02:17 +00:00
Simon Butcher
decf2f5c2c
Merge remote-tracking branch 'public/pr/2291' into development
2018-12-20 12:02:11 +00:00
Simon Butcher
65ce5dc981
Merge remote-tracking branch 'public/pr/2290' into development
2018-12-20 12:02:05 +00:00
Simon Butcher
ad2e0dae32
Merge remote-tracking branch 'public/pr/2283' into development
2018-12-20 12:01:58 +00:00
Simon Butcher
0bbf7f450d
Merge remote-tracking branch 'public/pr/2279' into development
2018-12-20 12:01:49 +00:00
Simon Butcher
962b7b17d5
Merge remote-tracking branch 'public/pr/2273' into development
2018-12-20 12:01:17 +00:00
Simon Butcher
6be67a6518
Merge remote-tracking branch 'public/pr/2281' into development
2018-12-20 12:01:09 +00:00
Simon Butcher
dac513e246
Merge remote-tracking branch 'public/pr/2282' into development
2018-12-20 12:01:04 +00:00
Simon Butcher
ccafd14fee
Merge remote-tracking branch 'public/pr/2276' into development
2018-12-20 12:00:57 +00:00
Simon Butcher
2a8d32c6c1
Merge remote-tracking branch 'public/pr/2287' into development
2018-12-20 12:00:50 +00:00
Manuel Pégourié-Gonnard
01d4b76b7e
Remove faulty cipher_finish calls from nist_kw
...
The calls to cipher_finish didn't actually do anything:
- the cipher mode is always ECB
- in that case cipher_finish() only sets *olen to zero, and returns either 0
or an error depending on whether there was pending data
- olen is a local variable in the caller, so setting it to zero right before
returning is not essential
- the return value of cipher_finis() was not checked by the caller so that's
not useful either
- the cipher layer does not have ALT implementations so the behaviour
described above is unconditional on ALT implementations (in particular,
cipher_finish() can't be useful to hardware as (with ECB) it doesn't call any
functions from lower-level modules that could release resources for example)
Since the calls are causing issues with parameter validation, and were no
serving any functional purpose, it's simpler to just remove them.
2018-12-20 12:15:40 +01:00
Hanno Becker
2f6de42622
Move SHA256_VALIDATE[_RET] outside of MBEDTLS_SHA256_ALT guard
...
Somehow, mbedtls_sha256_ret() is defined even if MBEDTLS_SHA256_ALT
is set, and it is using SHA256_VALIDATE_RET. The documentation should
be enhanced to indicate that MBEDTLS_SHA256_ALT does _not_ replace
the entire module, but only the core SHA-256 functions.
2018-12-20 10:24:29 +00:00
Hanno Becker
c756049dc3
Move SHA512_VALIDATE[_RET] outside of MBEDTLS_SHA512_ALT guard
...
Somehow, mbedtls_sha512_ret() is defined even if MBEDTLS_SHA512_ALT
is set, and it is using SHA512_VALIDATE_RET. The documentation should
be enhanced to indicate that MBEDTLS_SHA512_ALT does _not_ replace
the entire module, but only the core SHA-512 functions.
2018-12-20 10:24:00 +00:00
Hanno Becker
b3c70230d2
Move SHA1_VALIDATE[_RET] outside of MBEDTLS_SHA1_ALT guard
...
Somehow, mbedtls_sha1_ret() is defined even if MBEDTLS_SHA1_ALT
is set, and it is using SHA1_VALIDATE_RET. The documentation should
be enhanced to indicate that MBEDTLS_SHA1_ALT does _not_ replace
the entire module, but only the core SHA-1 functions.
2018-12-20 10:18:05 +00:00
k-stachowiak
6adb0574ea
Improve details of CCM parameter validation and documentation
2018-12-19 19:02:39 +01:00
k-stachowiak
f712534801
Add missing validation code in CCM
2018-12-19 19:02:39 +01:00
k-stachowiak
ff8a0989c8
Allow empty arguments in some CCM functions' parameter validation
2018-12-19 19:02:39 +01:00
k-stachowiak
fd42d531ba
Explicitly allow NULL as an argument to mbedtls_ccm_free()
2018-12-19 19:02:39 +01:00
k-stachowiak
26d365eb54
Add parameter validation for CCM
2018-12-19 19:02:39 +01:00
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
70ded3602c
Minor improvements to Camellia module and documentation
2018-12-19 13:42:05 +00: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
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
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