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

Remove calls to MD layer functions from X.509 #5158

Closed
2 tasks
mpg opened this issue Nov 12, 2021 · 1 comment
Closed
2 tasks

Remove calls to MD layer functions from X.509 #5158

mpg opened this issue Nov 12, 2021 · 1 comment
Labels
enhancement size-s Estimated task size: small (~2d)

Comments

@mpg
Copy link
Contributor

mpg commented Nov 12, 2021

Currently calls to PSA for hashing in X.509 are conditional to MBEDTLS_USE_PSA_CRYPTO. Since we're now auto-enabling that, we don't need the alternative code path any more.

This task is to replace two instances of:

#if defined(MBEDTLS_USE_PSA_CRYPTO)
/* code using psa_hash */
#else
/* code using mbedtls_md */
#endif

with:

/* code using psa_hash */

While at it, the PSA version, which currently uses the multi-part API (with psa_hash_operation_t) can be simplified to use the single-part API psa_hash_compute().

  • replaced in x509_crt_check_signature()
  • replaced in mbedtls_x509write_csr_der_internal()

Depends on: #5156 (to be able to use PSA without #ifdefs).
See also: #5157

Note: this task is only about MD functions. PK functions may require more care and will be handled as a separate task.

@mpg mpg added enhancement Product Backlog size-s Estimated task size: small (~2d) labels Nov 12, 2021
@mpg mpg mentioned this issue Nov 12, 2021
6 tasks
@mpg mpg changed the title Remove calls to MD layers from X.509 Remove calls to MD layer functions from X.509 Nov 12, 2021
@mpg
Copy link
Contributor Author

mpg commented Dec 2, 2021

Closing as this no longer makes sense with the change of strategy (USE_PSA_CRYPTO will remain optional for now).

@mpg mpg closed this as completed Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

No branches or pull requests

1 participant