-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Always enable MBEDTLS_USE_PSA_CRYPTO in all.sh #9614
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
Always enable MBEDTLS_USE_PSA_CRYPTO in all.sh #9614
Conversation
367ac77 to
6a38f4a
Compare
34f9018 to
b35428a
Compare
With PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE disabled, test TLS 1.3 and USE_PSA TLS 1.2. With PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE disabled, just test crypto, because the TLS code needs that to generate ephemeral ECDH keys but this is not tracked properly (the ephemeral ECDH code is only gated on having ECDH). Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
b35428a to
99c3423
Compare
mpg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me except it doesn't do exactly what it says on the tin: now USE_PSA is enabled by default, but could still be disabled - either explicitly, or just by failing to define it when using a custom config.
Reading the PR's title, I would have expected something like removing USE_PSA from mbedtls_config.h and then defining it unconditionally in config_adjust_legacy_crypto.h for example. Reading the issue's description only re-inforced that impression.
That's a good point. This accomplishes the title of #9630: we're no longer building code that's guarded by I think this is a useful milestone, which has passed the CI and which you've reviewed. After this, we no longer have to worry about the non-use-PSA code paths in test code and test scripts. So I propose to declare this as a step towards #9630, and make a follow-up that fully resolves #9630. After that follow-up, we'll no longer have to worry about accidentally not enabling The follow-up (#9727) will need to take care of test scripts that query |
mpg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving now, considering #9614 (comment)
|
Uh, I clearly made some mistake in a rebase. Originally this branch had no |
|
So I just accidentally dropped one commit in a rebase. It still applies cleanly so here goes. (But with an amended commit message, because the message didn't work with the changed commit order.) |
Remove all.sh components that explicitly disable MBEDTLS_USE_PSA_CRYPTO, and for which there is another component with MBEDTLS_USE_PSA_CRYPTO enabled that does the same or more testing. Signed-off-by: Gilles Peskine <[email protected]>
760dc8b to
3982898
Compare
mpg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Looking at the outcomes file: The first one has nothing that's affected by |
yanesca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
(API break check expected to fail as the PR turns USE_PSA_CRYPTO on in the default configuration.)
|
The successor #9727 is ready for review. |
A step towards #9630: we no longer test with
MBEDTLS_USE_PSA_CRYPTOdisabled. It's still possible to disable it explicitly; that will be handled in a follow-up.Note: this may conflict with the work to migrate
depends.pyto the PSA configuration (#9292, #9612, #9633, #9634, #9654).PR checklist