Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defragment ext test 3.6 #9976

Draft
wants to merge 30 commits into
base: mbedtls-3.6
Choose a base branch
from
Draft

Conversation

mpg
Copy link
Contributor

@mpg mpg commented Feb 13, 2025

Description

WIP, pushed for early CI feedback.

Built on top of #9949 - only the last few commits are new.

PR checklist

  • changelog provided | not required because:
  • development PR provided # | not required because:
  • TF-PSA-Crypto PR provided # | not required because:
  • framework PR provided Mbed-TLS/mbedtls-framework# | not required
  • 3.6 PR provided # | not required because:
  • 2.28 PR provided # | not required because:
  • tests provided | not required because:

rojer and others added 27 commits February 3, 2025 09:58
Co-authored-by: minosgalanakis <[email protected]>
Signed-off-by: Deomid Ryabkov <[email protected]>
Signed-off-by: Deomid rojer Ryabkov <[email protected]>
Except the first

Signed-off-by: Deomid rojer Ryabkov <[email protected]>
Signed-off-by: Deomid rojer Ryabkov <[email protected]>
Tests uses openssl s_server with a mix of max_send_frag
and split_send_frag options.

Signed-off-by: Waleed Elmelegy <[email protected]>
* Add tests for the server side.
* Remove restriction for TLS 1.2 so that we can test TLS 1.2 & 1.3.
* Use latest version of openSSL to make sure -max_send_frag &
  -split_send_frag flags are supported.

Signed-off-by: Waleed Elmelegy <[email protected]>
Not used so far, just the scaffolding.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Manually remove it in ssl.h, then:

sed -i 's/ssl->in_iv/ssl->in_ext->in_iv/g' library/ssl_*.[ch]

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Manually remove from ssl.h, then:

 sed -i 's/ssl->in_hs\(hdr\|fraglen\)/ssl->in_ext->in_hs\1/g' library/ssl_*.[ch]

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
In principle, pointers to char and pointers to word-aligned structs
might have different sizes. However, it's guaranteed that any pointer
can be converted to a char pointer and back, so it's OK to store the
pointer to struct as a pointer to char.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Not used for real stuff so far, just getting the tooling in place.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
This allows us to use a ciphersuite that will still be supported in 4.0.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
@mpg mpg added the needs-ci Needs to pass CI tests label Feb 13, 2025
@mpg mpg changed the base branch from development to mbedtls-3.6 February 13, 2025 12:02
That struct doesn't really need early initializing anyway, it's not
freed in the exit block.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
mpg added 2 commits February 17, 2025 10:08
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci Needs to pass CI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants