sys/psa_crypto: Update key headers#21046
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]>
mguetschow
left a comment
There was a problem hiding this comment.
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 Details |
|
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 |
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! |
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]>
c283518 to
7cabd3e
Compare
|
The tests seems to be happy now, anything else which needs to be changed? |
mguetschow
left a comment
There was a problem hiding this comment.
Looks good, thank you!
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.