-
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
Define legacy error codes as aliases for PSA error codes #9629
base: development
Are you sure you want to change the base?
Define legacy error codes as aliases for PSA error codes #9629
Commits on Sep 15, 2024
-
Use MBEDTLS_ERROR_ADD instead of explicit addition: simple cases
Replace obvious additions of an `MBEDTLS_ERR_xxx` constant by a call to `MBEDTLS_ERROR_ADD`. Skip `case` statements since `MBEDTLS_ERROR_ADD(pp_constant)` is not a preprocessor constant. This commit does not replace additions split over lines. Those will be handled in a subsequent commit. ``` git ls-files '*.h' '*.c' '*.function' '*.data' | xargs perl -i -pe ' next if /\bcase\b/; s/\b(MBEDTLS_ERR_\w+)\s*\+\s*(\w+)\b/MBEDTLS_ERROR_ADD($1, $2)/g; s/\b(\w+)\s*\+\s*(MBEDTLS_ERR_\w+)\b/MBEDTLS_ERROR_ADD($1, $2)/g' ``` Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aa1757e - Browse repository at this point
Copy the full SHA aa1757eView commit details -
Use MBEDTLS_ERROR_ADD instead of explicit addition: enforcement
Reject direct additions of error constants (regex-based approximation). Fix the lone straggler. Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c393aca - Browse repository at this point
Copy the full SHA c393acaView commit details -
Include "error.h" for MBEDTLS_ERROR_ADD
Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 65ce989 - Browse repository at this point
Copy the full SHA 65ce989View commit details
Commits on Sep 16, 2024
-
Always use the low-level error code
What could possibly go wrong... Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 71e1ff7 - Browse repository at this point
Copy the full SHA 71e1ff7View commit details -
Have a low-level error code override any high-level one
We mostly use MBEDTLS_ERROR_ADD with both a low-level and a high-level error, but we also occasionally use it with a low-level code that can be 0. Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bccd656 - Browse repository at this point
Copy the full SHA bccd656View commit details -
Don't expect added error codes
Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 715fec2 - Browse repository at this point
Copy the full SHA 715fec2View commit details
Commits on Sep 24, 2024
-
Make it possible to include psa/crypto_values.h independently
Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c02dd77 - Browse repository at this point
Copy the full SHA c02dd77View commit details -
Change MBEDTLS_ERR_ERROR_xxx to use PSA values
Signed-off-by: Gilles Peskine <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d15a785 - Browse repository at this point
Copy the full SHA d15a785View commit details