-
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
Missing include psa_crypto_service_integration.h in psa_crypto_mac.c #4649
Comments
Patch available: #4650 . Since we don't have a check for this in our CI, can you please let us know whether this patch works? |
Hi Gilles, |
I'm sorry, I don't understand the problem. Which files give warnings now? What about including |
I tried some tests and find that
If the order is not, then it will have similar building warning and errors, for example: The patch's idea is okay, but need to put #include "psa_crypto_service_integration.h" in front of #include "psa/crypto.h" |
Indeed, I got the order wrong in What about putting the inclusion in |
The order is also wrong in psa_crypto_slot_management.c file. I tired add '#include "psa_crypto_service_integration.h" ' in crypto_platform.h, it tests okay. But you mentioned you've forgotten if there was a good reason not to do this. So I am not sure whether it is good from design view. |
The general idea is: there's a So the NW function gets the normal name, and the SW function gets names with a prefix. The macro has to be defined before any occurrence of If including |
Thanks for your detailed explanation : ) I got it! |
The pull request is up: #4673. I've put in a non-regression test, which means this shouldn't break until |
Summary
In psa_crypto_mac.c file, it calls some psa crypto spec APIs, like 'psa_hash_setup', 'psa_hash_update'.
It will cause some errors when integration mbedtls with other project if not include 'psa_crypto_service_integration.h' header.
I think it is some for other psa_crypto_xxx.c files if it calls standards psa crypto apis.
System information
Mbed TLS version (number or commit id): development branch
Operating system and version:
Configuration (if not default, please attach
config.h
):Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:
Expected behavior
Actual behavior
Steps to reproduce
Additional information
The text was updated successfully, but these errors were encountered: