61fd13c6a5
Merge remote-tracking branch 'mbedtls/development' into tls13-cli-max-early-data-size
2024-03-10 18:09:47 +01:00
7e1f9f290f
Merge pull request #8854 from ronald-cron-arm/tls13-srv-max-early-data-size
...
TLS 1.3: Enforce max_early_data_size on server
2024-03-09 00:16:07 +00:00
e1295fabaf
tests: ssl: early data: Fix comments
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 17:05:27 +01:00
52472104a2
tests: suite: early data: Add comments
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 14:51:20 +01:00
4facb0a9cd
tests: ssl: Improve early data test code
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 14:51:20 +01:00
1a13e2f43e
tests: ssl: Improve test code for very small max_early_data_size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 14:51:20 +01:00
139a4185b1
Merge pull request #8587 from yanrayw/issue/4911/ssl_setup-check-RNG-configuration
...
TLS: check RNG when calling mbedtls_ssl_setup()
2024-03-08 07:38:39 +00:00
411cb6c30f
test_suite_ssl: Added ssl_session_id_accessors_check.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2024-03-06 13:52:03 +00:00
e93cd1b580
tests: ssl: Free write/read test buffers
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 19:30:00 +01:00
7c07aab72e
tests: write early data: Improve tls13_cli_max_early_data_size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 19:07:40 +01:00
ae6f9a58a9
tests: write early data: Allocate buffer to write/read
...
Allocate the buffer to write/read early data. That
way in ASan builds. buffer overwrite/overread can
be detected.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 19:07:34 +01:00
aab4a546bf
tests: Set the default conf then customize
...
Set the default conf then customize, not the
other way around.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 17:09:22 +01:00
10b040fa6f
tests: ssl_helpers: Rename rng_get to mbedtls_test_random
...
mbedtls_test_ as the prefix for test APIs
_random like in mbedtls_ctr/hmac_drbg_random
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 17:00:38 +01:00
de9b03dcba
tls13: Rename early_data_count to total_early_data_size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 15:14:17 +01:00
aad8523764
tests: ssl: Test enforcement of maximum early data size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 15:10:22 +01:00
fcbf776d06
tests: ssl: Restore write_early_data test function
...
For negative testing of early data (tests
related to max_early_data_size in this PR), restore
the test function to write early data that was
first introduced to be able to test the reading
of early data with the writing part and was
removed (as not used anymore) by the PR 8760.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 10:00:47 +01:00
25ad10a920
tests: ssl: Improve tls13_srv_max_early_data_size()
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
19bfe0a631
tls13: Rename early_data_count to total_early_data_size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
70eab45ba6
tls13: generic: Fix log
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
dc81b7343f
tests: srv max early data size: Add reach_max test arg
...
Add the reach_max flag argument for the
test13_srv_max_early_data_size test
function. Non zero value only valid in case
of TEST_EARLY_DATA_ACCEPTED scenario.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
01d273d31f
Enforce maximum size of early data in case of HRR
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
919e596c05
Enforce maximum size of early data when rejected
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
2160bfe4e2
tests: ssl: Test enforcement of maximum early data size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-01 09:29:16 +01:00
9b4e964c2c
Merge pull request #8760 from ronald-cron-arm/tls13-write-early-data
...
TLS 1.3: Add mbedtls_ssl_write_early_data() API
2024-02-29 14:31:55 +00:00
dcb09ca6df
tests: write early data: Improve get_early_data_status testing
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-22 12:22:59 +01:00
7d158f41ca
tests: read early data: Use write API to send early data
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-22 11:46:08 +01:00
110303fbe5
tests: read early data: Add no early data indication sent scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-22 11:46:02 +01:00
86d288c0d4
tests: ssl: Rename tls13_early_data to tls13_read_early_data
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-22 11:28:29 +01:00
9f2c3c09df
tls13: cli: Add mbedtls_ssl_get_early_data_status() API
...
Add mbedtls_ssl_get_early_data_status() API and its
testing.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:44:51 +01:00
0004600702
tests: write early data: Inverse loop over state logic
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:44:45 +01:00
bf5e909467
tests: write early data: Check we can complete handshake after writing
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:42:59 +01:00
d4069247b8
Improve comments/documentation
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:37:26 +01:00
0ecb5fd6f5
Merge pull request #8574 from ronald-cron-arm/ssl-tickets
...
Fix and align ticket age check in ssl_ticket.c for TLS 1.2 and TLS 1.3
2024-02-21 09:38:46 +00:00
41bed383ec
To check if client random number is unchanged while receiving HRR
...
Signed-off-by: BensonLiou <momo1208@gmail.com >
2024-02-16 16:07:53 +08:00
24da9917a6
tests: ssl: early data: Add systematic default case in scenario switches
...
In TLS 1.3 early data tests, to reduce the risk
of not updating a switch over possible scenarios
when adding a new scenario, add systematically a
default case that fails the test.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-15 17:19:14 +01:00
5fbd27055d
tls13: Use a flag not a counter for CCS and HRR handling
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-15 17:19:02 +01:00
b3d42fddae
tests: write early data: Add HRR scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
05600e26f4
tests: write early data: Add "server rejects" scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
8fe2b01b52
tests: write early data: Add "not sent" scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
2fbbba9c51
tests: ssl: Add write early data unit test
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
2261ab298f
tests: early data status: Add HRR scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
d6dba675b8
tests: early data status: Add "server rejects" scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
265273e8b3
tests: early data status: Add "not sent" scenario
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
5c208d7daf
tests: ssl: Add scenario param to early data status testing function
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
a7f94e49a8
tests: ssl: Add early data status unit test
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
bfcdc069ef
tests: ssl: Use get TLS 1.3 ticket helper for early data test
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
1f6e4e4a49
tests: ssl: Add helper function to get a TLS 1.3 ticket
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
ced99be007
tests: ssl: Add early data handshake option
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
fb53647b0b
tests: ssl: Move group list to options
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 16:43:33 +01:00
d0a772740e
tests: early data: Complete the handshake
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-06 11:15:48 +01:00