-
Notifications
You must be signed in to change notification settings - Fork 96
Change the compatibility API to inline functions #365
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
Conversation
Thanks Soby. Making the old function names be static inline functions rather than macros is ok. However, you'll need to change several things to pass the CI. I think the functions should return Please ensure that the CI passes. In particular, run
|
This patch changes the compatibility API defined in crypto_compat.h to static inline functions as the previous macro definitions were causing issues for the C pre-processor when included in projects which need to redefine the PSA function names. Making it static inline function solves this problem neatly and also modern compilers do a good job at inlining the function which makes the need for making it a macro redundant. Signed-off-by: Soby Mathew <[email protected]>
4c7c3b4
to
0a4270d
Compare
Thanks Gilles. I have updated with new patch. |
CI is failing only on a known unrelated issue on Mbed OS, so that's as good as a 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.
Thank you. I'm trying to remember why I didn't make these inline functions originally. Since I didn't give any reason in the commit message, and I can't come up with a reason now, that must have been an oversight.
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
* ARMmbed#365 Change PSA compatibility API to inline functions * ARMmbed#367 Fix pk_parse_key()'s use of rsa_complete() * ARMmbed#370 Bump version to Mbed TLS 2.21.0
This patch changes the compatibility API defined in crypto_compat.h
to static inline functions as the previous macro definitions were
causing issues for the C pre-processor when included in projects
which need to redefine the PSA function names. Making it static
inline function solves this problem neatly and also modern compilers
do a good job at inlining the function which makes the need for making
it a macro redundant.
Signed-off-by: Soby Mathew [email protected]