Manuel Pégourié-Gonnard
73247c6e19
Fix dependency issues
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
5d0a921e7a
Add test with non-HS record in-between HS fragments
...
Two of these tests reveal bugs in the code, so they're commented out for
now.
For the other tests, the high-level behaviour is OK (break the
handshake) but the details of why are IMO not good: they should be
rejected because interleaving non-HS record between HS fragments is not
valid according to the spec.
To be fixed in future commits.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
de7aac782e
Add test to TLS 1.3 ClientHello fragmentation
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
4afdf340dd
Add reference tests with 1.3 ClientHello
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
e916652390
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:22:09 +01:00
Manuel Pégourié-Gonnard
6637ef798f
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:22:09 +01:00
Minos Galanakis
f475a15d5d
ssl-opt: Disabled the renegotiation delay for fragmented HS renegotiation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-14 00:15:40 +00:00
David Horstmann
e35672940c
Update broken link to PSA driver dev examples
...
This link is broken in development as the document has been moved to the
TF-PSA-Crypto repository.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-03-13 16:53:27 +00:00
David Horstmann
079d7909a1
Add note about MBEDTLS_PRIVATE() in 3.6
...
Note that in the Mbed TLS 3.6 LTS, users can generally rely on being
able to access struct members through the MBEDTLS_PRIVATE() macro, since
we try to maintain ABI stability within an LTS version.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-03-13 16:49:08 +00:00
Gilles Peskine
c4dd970386
Merge pull request #9096 from noahp/noahp/mbedtls_net_send-api-desc-tweak
...
mbedtls_net_send API description typo fix
2025-03-13 16:22:55 +00:00
David Horstmann
edebcc04f8
Fix typos in the 3.0 migration guide
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-03-13 15:52:00 +00:00
Minos Galanakis
641e08e2aa
ssl-opt: Updated documentation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:43:08 +00:00
Minos Galanakis
1d78c7d58d
ssl-opt: Added client-initiated server-rejected renegotation test.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:44 +00:00
Minos Galanakis
a8f14384f8
ssl-opt: Updated O_NEXT_CLI_RENEGOTIATE used by fragmented HS renegotiation with certificates.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:44 +00:00
Minos Galanakis
df4ddfdf0c
ssl-opt: Fragmented HS renegotiation, removed -legacy_renegotiation argument.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:44 +00:00
Minos Galanakis
0b830f145f
ssl-opt: Fragmented HS renegotiation, removed requires_certificate_authentication dependency.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:44 +00:00
Minos Galanakis
9b2e4b80e7
ssl-opt: Fragmented HS renegotiation, removed requires_openssl_3_x dependency.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
af0e60b38f
ssl-opt: Fragmented HS renegotiation, adjusted test names for consistency.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
70be67b97e
ssl-opt: Fragmented HS renegotiation, updated matching regex
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
ae54c749fc
ssl-opt: Added coverage for client-initiated fragmented HS renegotiation tests.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
a7b19aa857
ssl-opt: Refactored fragmented HS renegotiation tests.
...
- Switched to using MBEDTLS_SSL_PROTO_TLS1_2 for dependency.
- Re-ordered tests.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
990a10909d
ssl-opt: Fragmented HS renegotiation, updated documentation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
135ebd3241
ssl-opt: Removed mock-tests from HS renegotiation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
87be69a3fc
sll-opt: Added refence fix for the Mock HS Defrag test using renegotitiation delay
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
7134e52dec
programs -> ssl_client2.c: Added option renego_delay to set record buffer depth.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
05009c736c
Added Mock Renegotiation negative test for testing.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
529188f30b
ssl-opt: Added fragmented HS tests for server-initiated renegotiation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
5aaa6e048b
ssl-opt: Added fragmented HS tests for client-initiated renegotiation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Minos Galanakis
daa14a4212
ssl-opt: Added fragmented HS tests for SSL_VARIABLE_BUFFER_LENGTH.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-13 11:06:43 +00:00
Bence Szépkúti
906d3cdff5
Merge pull request #10020 from bensze01/msvc-format-size-macros
...
Fix preprocessor guards for C99 format size specifiers
2025-03-13 10:09:06 +00:00
Manuel Pégourié-Gonnard
50432e42c8
Merge pull request #10057 from minosgalanakis/feature_merge_defragmentation_dev
...
Merge defragmentation feature branch onto development
2025-03-13 08:36:06 +00:00
Bence Szépkúti
24f11a366d
Use an array of strings instead of pointer smuggling
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 19:14:50 +01:00
Bence Szépkúti
46e0b1cac9
Use dummy typedef instead of macro
...
Use a dummy definition of mbedtls_ms_time_t in builds without
MBEDTLS_HAVE_TIME.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 17:11:46 +01:00
Bence Szépkúti
011b6cb1c5
Fix comments
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 17:11:42 +01:00
Bence Szépkúti
9ea9504176
Update changelog to call out MinGW
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 17:11:33 +01:00
Minos Galanakis
a4c9233292
Updated framework pointer.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-12 15:25:17 +00:00
Minos Galanakis
a2a0c2cbe7
Merge remote-tracking branch 'origin/features/tls-defragmentation/development' into feature_merge_defragmentation_dev
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-12 15:25:06 +00:00
Bence Szépkúti
cd1ece7846
Never use %zu on MinGW
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:18:35 +01:00
Bence Szépkúti
ebe1f811c8
Remove Everest VS2010 compatibility headers
...
These headers were necessary for compatibility with Visual Studio 2010,
and interfere with the system headers on Visual Studio 2013+, eg. when
building Mbed TLS using the .sln file shipped with the project.
Move the still-required definition of "inline" to callconv.h, where the
definition for GCC also lives.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:18:20 +01:00
Bence Szépkúti
becb21e668
Fix MSVC version guard for C99 format size specifiers
...
Visual Studio 2013 (_MSC_VER == 1800) doesn't support %zu - only use it
on 2015 and above (_MSC_VER >= 1900).
%ldd works on Visual Studio 2013, but this patch keeps the two macro
definitions together, for simplicity's sake.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:16:20 +01:00
Bence Szépkúti
58bb7ecd94
Disable fatal assertions in Windows printf tests
...
The Windows CRT treats any invalid format specifiers passed to the CRT
as fatal assertion failures. Disable thie behaviour temporarily while
testing if the format specifiers we use are supported.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:16:20 +01:00
Bence Szépkúti
154066d118
Add testcase for MBEDTLS_PRINTF_MS_TIME
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:16:20 +01:00
Bence Szépkúti
c6a8bf0f8e
Test handling of format macros defined in debug.h
...
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:16:20 +01:00
Bence Szépkúti
122105269a
Run test_suite_debug without MBEDTLS_SSL_TLS_C
...
Move the suite's global dependency on MBEDTLS_SSL_TLS_C to the
individual test cases.
Add an preprocesor guard around string_debug to prevent warning about unused
functions.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-03-12 16:16:20 +01:00
Manuel Pégourié-Gonnard
70bab4e61f
Merge pull request #10040 from gilles-peskine-arm/tls-defragment-doc
...
Document the limitations of TLS handshake message defragmentation
2025-03-12 13:00:15 +01:00
Gilles Peskine
4c30cd8e49
Update the location of defragmentation limitations
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-12 10:08:14 +01:00
Gilles Peskine
2b78a5abfa
State globally that the limitations don't apply to DTLS
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-12 10:07:33 +01:00
Gilles Peskine
d9c858039e
Clarify DTLS
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-11 13:47:49 +01:00
Gilles Peskine
80facedad9
ClientHello may be fragmented in renegotiation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-11 13:47:14 +01:00
Gilles Peskine
d8f9e22b5e
Move the defragmentation documentation to mbedtls_ssl_handshake
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-11 13:45:27 +01:00