-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/psa_crypto: Update key headers #21046
base: master
Are you sure you want to change the base?
Conversation
Split key definitions into separate files, together with some basic support macros. This allows PSA crypto backends to use this definitions without pulling in all the other type definitions. Signed-off-by: Armin Wolf <[email protected]>
Split key attributes definitions into separate file, together with some basic support macros and helper functions. This allows PSA crypto backends to use this definitions without pulling in all the other type definitions. Signed-off-by: Armin Wolf <[email protected]>
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 from a brief look at the changes, trusting you that you haven't changed details while moving code around :)
Maybe @Einhornhool can give a second look?
CI encountered some problem while building
|
I suspect that this happens because now the definition of Previously the definition was an incomplete type in such a case. I will try to fix this. |
I think that Should i add the preprocessor check or should i reinstate the incomplete type definition of |
We could also solve this problem by always defining |
Huu, I think we need @Einhornhool's assessment here regarding the conditional compilation and includes. I think I'd favor having the type defined in any case, since it doesn't cost |
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!
Edit, sorry, did not see the discussion. I'll check that out now
Ok, my thoughts.
where it applies. |
The problem is that the key types are also used inside the multi-part function prototypes, so we would need a lot if preprocessor checks. I rather suggest that we do not hide the type definitions behind such a preprocessor check. |
Aah, okay. Well in that case, go for it! |
Contribution description
This PR is a continuation of PR #20906. The final goal still is to split all definitions into separate header files, so backends can for example use psa_key_attributes_t without pulling in the definition for psa_mac_operation_t.
Testing procedure
The changes where tested using the PSA crypto unit tests and appear to work.
Issues/PRs references
Continuation of PR #20906.