-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[3.6 only] Document transitional feature macros / guards #9161
Conversation
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 correct to me apart from some minor niggles. I haven't reviewed for completeness.
However, this does not address #8736.
Aw, I forgot to add the new file, how embarrassing. Sorry. |
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.
Thank you very much for writing this up! This is a great guide overall. I've commented on some typos and imprecisions.
- transitional `MBEDTLS_xxx` macros that stem from the desire to be able to | ||
use crypto mechanisms that are only provided by a driver (G5 in | ||
`strategy.md`). | ||
|
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.
Macros defined in include/mbedtls/config_adjust_legacy_*.h
only, used outside of include/mbedtls/*.h
and not mentioned here:
MBEDTLS_BLOCK_CIPHER_xxx_VIA_xxx
(used in library, test dependencies)MBEDTLS_BLOCK_CIPHER_SOME_PSA
(used in library, test helpers, test code)MBEDTLS_MD_xxx_VIA_PSA
(used in library, test dependencies)MBEDTLS_PSA_UTIL_HAVE_ECDSA
(used in library, test dependencies)
We should document them as well, but that's not a blocker for this pull request.
This should be on the 3.6 branch, since it won't be relevant in 4.0. |
Just reflecting recent/on-going work. Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Just reflecting recent/on-going work. Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Co-authored-by: Gilles Peskine <[email protected]> Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
@gilles-peskine-arm I added commits addressing your feedback, and then rebased to resolve conflicts and more importantly target the correct branch. Please feel free to review again. Note: I wasn't sure if this is priority medium of high, please feel free to adjust. |
@mpg 1. So this shouldn't be a draft PR anymore? 2. The CI isn't happy. |
Yeah, I meant to un-draft it but forgot, thanks for the reminder. Regarding the CI, I'm not sure what happened but it's looking happy now. |
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.
Thanks for the updates! This mostly looks good to me, but there's one 4.0 plan that just changed, and a few requests for clarifications from my previous review that you haven't addressed and I think at least some of them should be addressed.
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
@gilles-peskine-arm Thanks for your review and sorry for forgetting to address some of your comments. I believe I've now addressed all of them except for #9161 (comment) which I'd rather leave for later. |
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
|
||
**Legacy and `USE_PSA` domains:** for hashes, `MBEDTLS_MD_CAN_xxx` (where | ||
`xxx` is the legacy name of the hash) can be used everywhere (except in the | ||
PSA domain which should use `PSA_WANT` as usual). No special include is | ||
required, `build_info.h` or `common.h` is enough. | ||
|
||
**Pure TLS 1.3 domain:** it is not easy to know which uses of hashes fall in | ||
this domain as opposed to the `USE_PSA` domain which looking at the code. | ||
this domain as opposed to the `USE_PSA` domain whithout looking at the code. |
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.
Trivial:
this domain as opposed to the `USE_PSA` domain whithout looking at the code. | |
this domain as opposed to the `USE_PSA` domain without looking at the code. |
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. I don't have prior experience with 3.6 drivers but this information seems vastly useful for developing ontop of Mbed TLS. The transition guards section will be useful for developing ontop of Mbed TLS or contributing to the library as a whole.
Description
Resolves #8736
PR checklist