Manuel Pégourié-Gonnard
ac6c67053d
Print the list of failed suites in verbose mode
...
In verbose mode, the full output of each failing suite is printed out,
which for some suites runs in the 1000s of lines. If you didn't redirect
output to a file, this is a lot to scroll and can make it hard to
quickly identify which test suites failed.
So, let's print out that information at the end. This is useful
information for starting to figure out what went wrong.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-11 10:48:32 +02:00
Przemek Stekiel
d61a4d3d1a
Fix missing guard and double-space
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-11 09:40:40 +02:00
Gilles Peskine
b50e433b66
Test mbedtls_mpi_core_bitlen
...
Copy the test data for mbedtls_mpi_bitlen except for 0-length and negative cases.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
e943283f2f
More mbedtls_mpi_bitlen test cases
...
* with leading zero limb
* with trailing zero limb
* negative
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
24baa81043
Improve mbedtls_mpi_bitlen test descriptions
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
c5772a194e
mbedtls_test_read_mpi_core: allow odd number of hex digits
...
Test functions must now take a char* argument rather than data_t*. This does
not affect existing test data.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
cf42536d4e
Add a note that config.py must remain compatible with Python 3.4
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 22:52:30 +02:00
Janos Follath
1b5c85c75b
Merge pull request #6386 from gilles-peskine-arm/bignum-mbedtls_test_read_mpi_core
...
Introduce mbedtls_test_read_mpi_core
2022-10-10 15:14:46 +01:00
Jerry Yu
4f77ecf409
disable session resumption when ticket expired
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 22:10:08 +08:00
Jerry Yu
03aa174d7c
Improve test message and title
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 21:48:37 +08:00
Jerry Yu
6916e70521
fix various issues
...
- adjust guards. Remove duplicate guards and adjust format.
- Return success at function end. Not `ret`
- change input len
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 21:33:51 +08:00
Gabor Mezei
44ba2f6db9
Add more test cases
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 15:32:12 +02:00
Gabor Mezei
a67a1a3ebc
Remove the 'is_fail' parameter from the test functions
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 15:25:59 +02:00
Jerry Yu
21092062f3
Restrict cipher suite validation to TLS1.3
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 21:21:31 +08:00
Gabor Mezei
d7edb1d225
Initialize variable
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 14:32:09 +02:00
Gabor Mezei
e9c013c222
Handle if parameters are alised
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 14:26:57 +02:00
Przemek Stekiel
1f02c6c25e
Reword change log entry
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-10 13:30:52 +02:00
Przemek Stekiel
68a01a6720
Fix session tickets related build flags in fuzz_server and ssl_server2
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-10 13:30:43 +02:00
Gabor Mezei
d71eb0c3ac
Use better test macro
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 13:09:04 +02:00
Gabor Mezei
d6441da4c5
Remove redundant memory initialization
...
When memory is allocated it is also initialized with 0.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 13:05:16 +02:00
Gabor Mezei
251cb632f1
Remove unused macro definition
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-10-10 13:02:21 +02:00
Przemek Stekiel
52a428b824
Fix MBEDTLS_SSL_TICKET_C, MBEDTLS_SSL_SESSION_TICKETS dependencies
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-10 11:23:18 +02:00
Przemek Stekiel
42bb3ff40b
Adapt expected results in ChaCha20-Poly1305 ( invalid tag length)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-10 07:28:40 +02:00
Przemek Stekiel
88ade84735
psa_aead_setup: remove redundant tag length check
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-08 17:56:18 +02:00
Przemek Stekiel
6ab50762e0
psa_aead_setup: validate tag length before calling driver setup
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-08 17:54:30 +02:00
Jerry Yu
63b06ea06e
Update test cases
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 14:56:38 +08:00
Jerry Yu
03b8f9d299
Adjust guards for dummy_tickets
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 14:56:38 +08:00
Jerry Yu
a99cbfa2d3
fix various issues
...
- rename function and variable
- change signature of `ssl_tls13_has_configured_psk`
- remove unnecessary statements
- remove unnecessary local variables
- wrong variable initial value
- improve output message
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 14:35:47 +08:00
Jerry Yu
40afab61a8
Add ciphersuite check in set_session
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 14:35:43 +08:00
Jerry Yu
21f9095fa8
Revert "move ciphersuite validation to set_session"
...
This reverts commit 19ae6f62c7
.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 14:35:34 +08:00
Jerry Yu
379b91a393
add ticket age check
...
Remove ticket if it is expired.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-08 10:21:15 +08:00
David Horstmann
91e20a0580
Refactor macro-spanning ifs in ecdh.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
fc735dffd6
Refactor macro-spanning ifs in ecp.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
8a7629fd0f
Refactor macro-spanning if in asn1write.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
2788f6b668
Refactor macro-spanning if in sha512.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
687262ca7d
Refactor macro-spanning if in sha256.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
21b89761f8
Refactor macro-spanning if in ssl_tls13_server.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
10be134d8e
Refactor macro-spanning if in ssl_msg.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
4a28563e84
Refactor macro-spanning ifs in ssl_client.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:42 +01:00
David Horstmann
e0af39a2ef
Refactor macro-spanning ifs in ssl_tls12_server.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-07 14:08:36 +01:00
Janos Follath
96d4770bde
Merge pull request #6393 from KloolK/development
...
Fix typo
2022-10-07 08:43:43 +01:00
Przemek Stekiel
86679c7bd8
psa_validate_tag_length(): use PSA_WANT_ALG_xxx instead MBEDTLS_PSA_BUILTIN_ALG_xxx guards
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-07 08:24:19 +02:00
Jerry Yu
4a698341c9
Re-org selected_identity parser
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
6183cc7470
Re-org binders writer
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
f75364bee1
Re-organize identities writer
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
8b41e893a2
fix various issues
...
- Re-order code and comments
- move comment above `write_identities`
- move `write_binder` above `write_identities`.
- Add has_{psk,identity} into {ticket,psk}_get_{psk,identity}
- rename `*_session_tickets_*` to `_ticket_`
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
19ae6f62c7
move ciphersuite validation to set_session
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
25ab654781
Add dummy ticket support
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
b300e3c5be
add selected_identity parser
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00
Jerry Yu
1a0a0f4416
Add binders writer
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-07 10:11:05 +08:00