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

Move TLS auxiliary test scripts to the framework #56

Merged
merged 79 commits into from
Oct 16, 2024

Conversation

eleuzi01
Copy link
Contributor

@eleuzi01 eleuzi01 commented Oct 7, 2024

Resolves #54

Development PR: Mbed-TLS/mbedtls#9673

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
The associated config options are at the
right place.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
These options have been removed now.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move DRBG options to the
"Cryptographic mechanism selection (extended API)"
section.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move MBEDTLS_SELF_TEST option to
the "General and test configuration options"
section as MBEDTLS_VERSION_C.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move MBEDTLS_*_RETURN config options
in the same section as
MBEDTLS_CHECK_RETURN_WARNING.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move "Cryptographic mechanism selection (extended API)"
and "Data format support" just after section
Cryptographic mechanism selection (PSA API)"

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
We will add TF-PSA-Crypto specific ones when
we add support for querying version and version
features in TF-PSA-Crypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Do not mix boolean and non boolean options
though.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Re-order mbedtls_config.h sections for
the order to be more aligned with the
tf_psa_crypto_config.h one.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Re-organize "Mbed TLS modules" and "Module configuration options"
into "X.509 feature selection" and "TLS feature selection" for
better alignment with tf_psa_crypto_config.h.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Rename MBEDTLS_PSA_CRYPTO_(USER_)CONFIG_FILE to
TF_PSA_CRYPTO_(USER_)CONFIG_FILE as we rename
crypto_config.h to tf_psa_crypto_config.h.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Remove dependency on mbedtls_test_helpers
to build the crypto test suites.
mbedtls_test_helpers is TLS specific.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move library options to the top CMakeLists.txt.
That way:
- we will be able to set the TF-PSA-Crypto
library options according to the Mbed TLS ones.
- we can define the crypto library target names
in the top CMakeLists.txt and not in the library
one that is dedicated to the TLS and x509
libraries now.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
@mpg
Copy link
Contributor

mpg commented Oct 10, 2024

I actually wonder how the version/configuration of git used on GitHub decides that only one file is problematic.

The file indicated as problematic here is the only one that was modified (removing a import framework_scripts_path # pylint: disable=unused-import that was no longer needed), so I think that's why it's flagged. git is probably smart enough to figure out that the others had identical contents at the various points in the history where they were being deleting and not complain about them.

@gilles-peskine-arm
Copy link
Contributor

When I try the merge locally I see a lot of modify/delete conflicts (reported as rename/delete for files that were moved to tf-psa-crypto).

That was with git 2.34.1. With git 2.43.0 the only conflicts are

CONFLICT (rename/delete): tests/scripts/generate_tls13_compat_tests.py renamed to scripts/generate_tls13_compat_tests.py in HEAD, but deleted in main.
CONFLICT (modify/delete): scripts/generate_tls13_compat_tests.py deleted in main and modified in HEAD.  Version HEAD of scripts/generate_tls13_compat_tests.py left in tree.
CONFLICT (rename/delete): tests/scripts/check_test_cases.py renamed to scripts/mbedtls_framework/collect_test_cases.py in main, but deleted in HEAD.
CONFLICT (modify/delete): scripts/mbedtls_framework/collect_test_cases.py deleted in HEAD and modified in main.  Version main of scripts/mbedtls_framework/collect_test_cases.py left in tree.

I guess newer versions of git are more clever. Strategy options might matter, I haven't tried fiddling with them.

@gilles-peskine-arm
Copy link
Contributor

When I try the merge locally

Another difference between me and GitHub is that I was merging main into this branch. In complicated cases like this the conflicts might not be symmetrical.

@davidhorstmann-arm
Copy link
Contributor

Re-running the move-to-framework script and cherry-picking the subsequent commits would be an option to get a cleaner history.

This is what I've been doing when merge conflicts appear. At one time I considered trying to make a 'rebase' feature in the script to make this easier, but it's not much more difficult to just re-run the script to regenerate the move commit.

Signed-off-by: Gergely Korcsák <gergely.korcsak@arm.com>
@eleuzi01 eleuzi01 force-pushed the issue-54 branch 2 times, most recently from c7513b5 to c0fe811 Compare October 10, 2024 13:28
gilles-peskine-arm and others added 2 commits October 10, 2024 13:45
…t-dev

Split check_test_cases.py and outcome_analysis.py
Fix driver schema json default type requirements
mpg
mpg previously approved these changes Oct 11, 2024
Copy link
Contributor

@mpg mpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Harry-Ramsey and others added 5 commits October 11, 2024 12:20
This commit removes #include "mbedtls/buildinfo.h" from pkcs7.c as it is
not needed unlike other C modules.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit replaces #include "common.h" in favour of #include
"ssl_misc.h".

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit replaces the include of "common.h" with "ssl_misc.h" for
generated files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit removes duplicate includes for mbedtls/build_info.h where
the file already includes common.h.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
…le-development

Refactor duplicate common header file
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
Copy link
Contributor

@davidhorstmann-arm davidhorstmann-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@davidhorstmann-arm davidhorstmann-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Oct 16, 2024
@davidhorstmann-arm
Copy link
Contributor

CI on Mbed-TLS/mbedtls#9673 and Mbed-TLS/mbedtls#9675 validates this PR so I'll merge.

@davidhorstmann-arm davidhorstmann-arm merged commit 311d8ac into Mbed-TLS:main Oct 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports enhancement New feature or request priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move TLS auxiliary test scripts to the framework
9 participants