Manuel Pégourié-Gonnard
43a04e7640
Re-introduce log asserts on positive cases
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
8476c38b21
Improve a test assertion
...
That way if it ever fails it will print the values.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
4712b3e6b8
Adjust logic around log pattern
...
This is more flexible: the test data gets to decide whether we want to
assert the presence of a pattern or not.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
051b1e21d6
Reduce the level of logging used in tests
...
This should avoid running into a bug with printf format specifiers one
windows.
It's also a logical move for actual tests: I used the highest debug
level for discovery, but we don't need that all the time.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
996c4c00a6
Fix dependency issues
...
Declare the same dependencies as for the previous TLS 1.3 tests, except
for part that varies with the cipher suite (ie AES-GCM).
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
6b25c504e1
New test function for large ClientHello
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
428ce0aff9
Add missing dependency declaration
...
This guards the definition of mbedtls_test_ssl_endpoint which we rely
on, so the function won't compile without it.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
3a7f1d229b
Fix dependency issues
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
f83bc798e1
Add supported_curves/groups extension
...
This allows us to use a ciphersuite that will still be supported in 4.0.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Manuel Pégourié-Gonnard
00ad6f6b03
New test function inject_client_content_on_the_wire()
...
Not used for real stuff so far, just getting the tooling in place.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:21:59 +01:00
Ronald Cron
204588678e
Merge pull request #9937 from valeriosetti/issue9688-backport
...
[Backport 3.6] Migrate DHE test cases to ECDHE
2025-01-29 09:59:11 +00:00
Valerio Setti
e94ab3cbdf
test_suite_ssl: add ECDHE-RSA case for handshake_fragmentation()
...
This is the backport of commit b8ef2a4455 from the "development" branch
which adapts handshake_fragmentation() to use ECDHE-RSA instead of
DHE-RSA. However, since DHE-RSA is not removed in the mbedtls-3.6 branch,
here tests are added instead of replaced.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-01-28 11:42:14 +01:00
Manuel Pégourié-Gonnard
ea18c7e1e5
Fix incorrect test function
...
We should not manually set the TLS version, the tests are supposed to
pass in 1.3-only builds as well. Instead do the normal thing of setting
defaults. This doesn't interfere with the rest of the testing, so I'm
not sure why we were not doing it.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-01-22 10:31:43 +01:00
Manuel Pégourié-Gonnard
632667e394
Remove useless dependency from test function
...
This dependency was never right in the first place.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-01-22 10:31:19 +01:00
Elena Uziunaite
47a9b3d5a5
Replace MBEDTLS_PK_CAN_ECDSA_SOME with MBEDTLS_PK_CAN_ECDSA_SIGN
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-09-16 14:25:38 +01:00
Michael Schuster
31b1cb8601
Adjust spacing in tests/suites function sources
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-06 12:09:13 +01:00
Ronald Cron
346b81877d
tests: ssl: Add hostname checks in session serialization tests
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-04-05 14:16:31 +02:00
Ronald Cron
1fb585492d
tests: ssl: Remove redundant test
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-04-05 14:16:31 +02:00
Ronald Cron
819636994e
tests: ssl: Fix session field guards
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-04-05 14:16:31 +02:00
Waleed Elmelegy
4dfb0e7c90
Add ALPN checking when accepting early data
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-03-15 12:12:15 +00:00
Ronald Cron
6bee910dbd
Merge pull request #8858 from waleed-elmelegy-arm/add_alpn_to_session
...
Add ALPN information in session tickets
2024-03-15 09:50:24 +00:00
BensonLiou
719c2ed9cb
Bugfix
...
* In TLS 1.3 clients, fix an interoperability problem due to the client
generating a new random after a HelloRetryRequest. Fixes #8669 .
Signed-off-by: BensonLiou <momo1208@gmail.com >
2024-03-14 11:47:38 +08:00
BensonLiou
3720809d19
Merge branch 'development' into random_bye_on_hrr
...
Signed-off-by: BensonLiou <momo1208@gmail.com >
2024-03-14 11:44:21 +08:00
BensonLiou
368debd384
Merge branch 'development' of https://github.com/Mbed-TLS/mbedtls into random_bye_on_hrr
2024-03-14 11:42:25 +08:00
Waleed Elmelegy
883f77cb08
Add mbedtls_ssl_session_set_alpn() function
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-03-13 16:50:01 +00:00
Waleed Elmelegy
2824a209bc
Add ALPN information in session tickets
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-03-13 16:50:01 +00:00
BensonLiou
bedd2519e6
fix code style
...
Signed-off-by: BensonLiou <momo1208@gmail.com >
2024-03-13 20:31:24 +08:00
Ronald Cron
40043d03a5
Merge pull request #8884 from ronald-cron-arm/improve-early-data-status
...
TLS 1.3: CLI: Split early data user status and internal state
2024-03-13 11:59:49 +00:00
Dave Rodgman
60c2f47f98
Merge pull request #8888 from minosgalanakis/features/add_ssl_session_accessor_8529
...
[MBEDTLS_PRIVATE] Add accessor for session and ciphersuite_id
2024-03-13 10:02:15 +00:00
Ronald Cron
840de7ff2f
tls13: cli: Rename STATUS_NOT_SENT to STATUS_NOT_INDICATED
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:18 +01:00
Ronald Cron
3641df2980
tls13: cli: Rename STATE_SENT to STATE_IND_SENT
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:18 +01:00
Ronald Cron
3c5a68339b
tls13: cli: Rename STATE_NOT_SENT to STATE_NO_IND_SENT
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:18 +01:00
Ronald Cron
0c80dc1ed5
tls13: cli: Rename STATUS_NOT_SENT to STATUS_NO_IND_SENT
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:18 +01:00
Ronald Cron
05d7cfbd9c
tls13: cli: Rename STATE_UNKNOWN to STATE_IDLE
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:18 +01:00
Ronald Cron
d2884662c1
tls13: cli: Split early data user status and internal state
...
Do not use the return values of
mbedtls_ssl_get_early_data_status()
(MBEDTLS_SSL_EARLY_DATA_STATUS_ macros)
for the state of the negotiation and
transfer of early data during the
handshake.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-12 17:48:15 +01:00
Ronald Cron
61fd13c6a5
Merge remote-tracking branch 'mbedtls/development' into tls13-cli-max-early-data-size
2024-03-10 18:09:47 +01:00
Ronald Cron
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
Ronald Cron
e1295fabaf
tests: ssl: early data: Fix comments
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 17:05:27 +01:00
Ronald Cron
52472104a2
tests: suite: early data: Add comments
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 14:51:20 +01:00
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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
Minos Galanakis
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
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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
Ronald Cron
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