Skip to content

Conversation

@bensze01
Copy link
Contributor

@bensze01 bensze01 commented Oct 22, 2025

Description

Move abi_check.py to the framework, and update it to support a standalone tf-psa-crypto

PR checklist

amtkarm1 and others added 30 commits August 12, 2025 13:50
Signed-off-by: Anton Matkin <[email protected]>
… now disallowed, changed to concrete jpake algorithm (with SHA256 hash)

Signed-off-by: Anton Matkin <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
…thout_heap

Enable p192[k|r]1 curves which are disabled by default in tf-psa-crypto.
This is required to get the proper test coverage otherwise there are
tests in 'test_suite_psa_crypto_op_fail' that would never be executed.

Signed-off-by: Valerio Setti <[email protected]>
Move the PAKE hash algorithm parameter into the alg id
tests: configuration-crypto: enable p192 curves in test_psa_crypto_without_heap
Return a const char* instead of taking a char* as an argument.

This aligns us with the interface used in TF PSA Crypto.

Signed-off-by: Bence Szépkúti <[email protected]>
Previously these tests used values that will become PSA aliases,
and so the tests will fail once they're changed.

Signed-off-by: Felix Conway <[email protected]>
Signed-off-by: Ben Taylor <[email protected]>
Add more detail around how generation of configuration-independent files
chooses a C compiler. Mention that setting HOSTCC or CC is recommended
where there are multiple toolchains.

Mention that the fallback location is the cc executable, which may help
users troubleshooting when the file generation picks up the wrong
toolchain (as in Mbed-TLS/mbedtls#10360).

Signed-off-by: David Horstmann <[email protected]>
…tion-cc

Clarify use of `CC` and friends for file generation
Remove all references to MBEDTLS_ECDSA_DETERMINISTIC from
components-configuration-crypto.sh. Replace them with
PSA_WANT_ALG_DETERMINISTIC_ECDSA.

This is safe because:
* MBEDTLS_ECDSA_DETERMINISTIC is only ever unset in components in order
  to avoid errors from disabling its dependency MBEDTLS_HMAC_DRBG_C.
* MBEDTLS_ECDSA_DETERMINISTIC is only ever defined in
  config_adjust_legacy_from_psa.h, and only if
  PSA_WANT_ALG_DETERMINISTIC_ECDSA is defined.

Therefore PSA_WANT_ALG_DETERMINISTIC_ECDSA's dependencies are a superset
of MBEDTLS_ECDSA_DETERMINISTIC's dependencies and must include
MBEDTLS_HMAC_DRBG_C, so disabling PSA_WANT_ALG_DETERMINISTIC_ECDSA is a
sufficient substitute for disabling MBEDTLS_ECDSA_DETERMINISTIC.

Signed-off-by: David Horstmann <[email protected]>
…ent directory CMakeLists.txt file

Signed-off-by: Felix Conway <[email protected]>
Signed-off-by: Felix Conway <[email protected]>
…o_rng_hash

crypto_config: Introduce MBEDTLS_PSA_CRYPTO_RNG_HASH (2/4)
Signed-off-by: Bence Szépkúti <[email protected]>
Argparse generally uses a return code of 2 for these situations.

Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
The same library may be present in the same build tree, eg.
libtfpsacrypto.so, which gets copied from the tf-psa-crypto/core/ to
library/ during an Mbed TLS build.

Make sure that the duplicated libraries are byte-for-byte identical,
otherwise abort the test.

Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
No functional changes.

Signed-off-by: Bence Szépkúti <[email protected]>
The only value that depended on us being in the project root was repo_path.

Signed-off-by: Bence Szépkúti <[email protected]>
The actual scripts will continue to live in the individual repositories.

Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
The default formatter coalesces all whitespace and reflows the text.

Signed-off-by: Bence Szépkúti <[email protected]>
Use `find` to sort scripts/abi_check.py into a separate invocation of pylint.

Signed-off-by: Bence Szépkúti <[email protected]>
@gilles-peskine-arm
Copy link
Contributor

@minosgalanakis This moves the file abi_check.py from mbedtls to mbedtls-framework, with its history. So it's pulling in the history of mbedtls (which was already mostly there from previous similar moves).

To review, check the following:

@bensze01
Copy link
Contributor Author

2 more things that might be good to check:

Copy link
Contributor

@gilles-peskine-arm gilles-peskine-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 at 12fe6e3 except for reporting pylint errors.

@gilles-peskine-arm gilles-peskine-arm added needs-work and removed needs-review Every commit must be reviewed by at least two team members. needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review labels Dec 19, 2025
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-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 at 12fe6e3

Copy link
Contributor

@minosgalanakis minosgalanakis left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from In Development to Has Approval in Roadmap pull requests (new board) Dec 22, 2025
@bensze01 bensze01 merged commit 7e8ddd4 into Mbed-TLS:main Dec 22, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Has Approval to Done in Roadmap pull requests (new board) Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority-high High priority - will be reviewed soon

Development

Successfully merging this pull request may close these issues.

10 participants