-
Notifications
You must be signed in to change notification settings - Fork 38
[tf-psa-crypto] Restrict MBEDTLS_X509_RSASSA_PSS_SUPPORT #253
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
base: development
Are you sure you want to change the base?
[tf-psa-crypto] Restrict MBEDTLS_X509_RSASSA_PSS_SUPPORT #253
Conversation
d838540
to
a2eff51
Compare
cf1266c
to
40b6da6
Compare
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, just a few suggestions for improvements.
tests/suites/test_suite_pk.function
Outdated
@@ -1118,16 +1104,15 @@ void pk_rsa_verify_ext_test_vec(data_t *message_str, int digest, | |||
* PSA or the Mbed TLS API, depending on the PSS options used. | |||
* So, it may return either INVALID_PADDING or INVALID_SIGNATURE. | |||
*/ | |||
fprintf(stderr, "result=%d, ret=%d\n", result, ret); |
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.
Leftover from debugging.
Also, looks like we could just update the data file with the correct error code now that we're always using PSA, and then we no longer need this if
and comment here.
tests/suites/test_suite_pk.function
Outdated
int ret; | ||
|
||
mbedtls_pk_init(&pk); | ||
MD_OR_USE_PSA_INIT(); | ||
USE_PSA_INIT(); |
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.
Minor: could even be PSA_INIT()
(and PSA_DONE()
), we know we're always using PSA now.
This commit also removes the legacy path which was not using PSA API. Signed-off-by: Valerio Setti <[email protected]>
Since the option is now ignored in mbedtls_pk_verify_ext(), we can simplify test code by not managing this extra parameter and just pass NULL instead. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
Since the legacy path in mbedtls_pk_verify_ext() has been removed and PSA is the only solution to perform RSA signature validation, there is no need to adapt return values for legacy/PSA paths. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
7dc025b
to
1dd184c
Compare
I had to rebase on
|
LGTM, just need to resolve Manuel's comments and get the CI to pass. |
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, thanks!
Description
This helps resolving Mbed-TLS/mbedtls#8154
PR checklist