Manuel Pégourié-Gonnard
31c1586893
Start separating handshake from record writing
2018-08-16 10:00:27 +02:00
Mohammad Azim Khan
2c069dfad3
Fix typo in test_suite_entropy.function
2018-08-15 13:55:37 +01:00
Janos Follath
08a4aebc46
HKDF: Add warning to partial functions
...
The standard HKDF security guarantees only hold if `mbedtls_hkdf()` is
used or if `mbedtls_hkdf_extract()` and `mbedtls_hkdf_expand()` are
called in succession carefully and an equivalent way.
Making `mbedtls_hkdf_extract()` and `mbedtls_hkdf_expand()` static would
prevent any misuse, but doing so would require the TLS 1.3 stack to
break abstraction and bypass the module API.
To reduce the risk of misuse we add warnings to the function
descriptions.
2018-08-14 16:08:38 +01:00
Janos Follath
d0a78e91b3
HKDF: Fix style issue
2018-08-14 16:08:37 +01:00
Hanno Becker
9dc3be7601
Improve wording in ChangeLog
2018-08-14 15:22:05 +01:00
Mohammad Azim Khan
9ebdcffef4
Fix Wformat-overflow warning in ssl_mail_client.c
...
sprintf( (char *) buf, "%s\r\n", base );
Above code generates Wformat-overflow warning since both buf and base
are of same size. buf should be sizeof( base ) + characters added in
the format. In this case format 2 bytes for "\r\n".
2018-08-14 11:02:23 +01:00
Hanno Becker
361f254eab
Adapt ChangeLog
2018-08-13 16:36:58 +01:00
Hanno Becker
7864090ec1
Reset session_in/out pointers in ssl_session_reset_int()
...
Fixes #1941 .
2018-08-13 16:35:15 +01:00
Ron Eldor
446227a1bd
Enhance nist_kw with some NULL buffers tests
...
Enhance the nist_kw test suite, with setting zero length input\output
buffers. Resolves #1882 .
2018-08-13 14:46:45 +03:00
Ron Eldor
d1a4762adb
Use mbedtls_printf instead of printf
...
Replace usages of `printf()` with `mbedtls_printf()` in `aria.c`
which were accidently merged. Fixes #1908
2018-08-13 13:49:52 +03:00
Jaeden Amero
d8f41698d2
Merge remote-tracking branch 'upstream-public/pr/1598' into development
...
Add a Changelog entry
2018-08-10 11:23:15 +01:00
Jaeden Amero
03bd4847b3
Merge remote-tracking branch 'upstream-public/pr/1861' into development
...
Add Changelog entry
2018-08-10 11:17:14 +01:00
Jaeden Amero
cac0c1a250
Merge remote-tracking branch 'upstream-public/pr/1378' into development
2018-08-10 10:59:53 +01:00
Jaeden Amero
603aee0c46
Merge remote-tracking branch 'upstream-public/pr/1816' into development
2018-08-10 10:56:48 +01:00
Jaeden Amero
372b50b252
Add a ChangeLog entry for #1816
2018-08-10 10:56:31 +01:00
Jaeden Amero
f48163a960
Merge remote-tracking branch 'upstream-public/pr/1834' into development
2018-08-10 10:49:10 +01:00
Mohammad Azim Khan
58e9c1833b
Fix Wformat-overflow warning in ssl_mail_client.c
...
sprintf( (char *) buf, "%s\r\n", base );
Above code generates Wformat-overflow warning since both buf and base
are of same size. buf should be sizeof( base ) + characters added in
the format. In this case format 2 bytes for "\r\n".
2018-08-06 12:02:02 +01:00
Mohammad Azim Khan
5cb7017077
Less obscure test suites template
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
d2d0112ca8
Style fixes
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
440d8737c6
Fix macro validation regex
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
ee6529eb83
Add generate_test_code.py unit tests in all.sh
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
21798105f6
Pylint tests in all.sh
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
539aa06f64
Fix Python 2 & 3 compatibility in test_generate_test_code.py
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
32cbcdac8f
Fix Pylint errors in Python scripts
2018-08-06 11:42:56 +01:00
Azim Khan
630281349e
Replaced escaped_split() logic with regex
2018-08-06 11:42:56 +01:00
Azim Khan
fcdf685302
Make test function parsing robust
...
This commit enhances parsing of the test function in generate_test_code.py for
cases where return type and function name are on separate lines.
2018-08-06 11:42:56 +01:00
Azim Khan
4084ec7ae5
Fixed unit tests in test_generate_test_code.py
2018-08-06 11:42:56 +01:00
Azim Khan
8d686bfdb1
Incorporated code revoew comments.
2018-08-06 11:42:56 +01:00
Azim Khan
b31aa44e16
Fix style errors reported by pylint
2018-08-06 11:42:56 +01:00
Azim Khan
aee05bbe70
Add test suite framework summary
2018-08-06 11:42:56 +01:00
Azim Khan
63ab501aa7
Fix generate_test_code.py argument --helpers-file in CMakeLists.txt
2018-08-06 11:42:56 +01:00
Azim Khan
27a35e7712
Wildcard possible targets and document
...
Test application names and function file names can be constructed
based on the followed naming convention. This commit documents the
naming convention and removes explicit listing of the test
executables and the lookup table for finding .function file.
2018-08-06 11:42:56 +01:00
Azim Khan
5fcca46a3a
Rename HexParam_t -> data_t for consistent coding style
2018-08-06 11:42:06 +01:00
Azim Khan
62a5d7d65a
Document status/error codes in helper.function
2018-08-06 11:42:06 +01:00
Azim Khan
951a2c8898
Improve documentation in mbedtls_test.py
2018-08-06 11:42:06 +01:00
Azim Khan
e3b26af7c0
Improve documentation in generate_test_code.py
2018-08-06 11:42:06 +01:00
Azim Khan
b98e6eec58
Replace asserts with exceptions in mbedtls_test.py
2018-08-06 11:42:06 +01:00
Azim Khan
040b6a2281
Wrap code to 79 character limit
2018-08-06 11:42:06 +01:00
Azim Khan
936ea9302a
Strip whitespaces added by decode() function
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
00c4b090c1
Change intermediate data file extension to .datax
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
ff560f2239
Rename makefile target gen-embedded-test - generate-target-tests
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
cfd834274b
Use integer instead of string as test result
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
53faf5c964
Widen the test app columns
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
8a3628fc86
Set PYTHON using ?= syntax
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
8f6e8cfcc7
Print line number with data file error
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
3b06f226e9
Replace asserts with exceptions in generate_test_code.py
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
c3521dfdd6
Fix generate_test_code.py unit tests
2018-08-06 11:40:58 +01:00
Azim Khan
0fa3504a77
Add missing MSVC typedefs
2018-08-06 11:40:58 +01:00
Gilles Peskine
667f7f8369
Fix generation of #line directives in Python 2
...
When using Python 2 (which is done in the Makefile), all #line
directives from the test code were generated with the line number 1.
This traces back to the change in the method name for generators in
Python 2 (next) vs Python 3 (__next__). Override both methods so that
the script remains compatible with both Python 2 and Python 3.
2018-08-06 11:40:58 +01:00
Gilles Peskine
7776141a16
Don't generate lines with only whitespace
2018-08-06 11:40:58 +01:00