You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the following code to include/mbedtls/check_config.h:
#if defined(MBEDTLS_LMS_C) && !defined(PSA_WANT_ALG_SHA256)
//#error "MBEDTLS_LMS_C defined, but not misspelled prerequisite"
#endif
(you can't have the actual #error because that causes a build failure)
Expectation: tests/scripts/check_names.py complains that PSA_WANT_ALG_SHA256 is a likely typo (the correct spelling is PSA_WANT_ALG_SHA_256). It would do so if the dependency was on MBEDTLS_SHA_256_C (misspelled for MBEDTLS_SHA256_C).
Actual behavior as of 0fe6631: tests/scripts/check_names.py is happy (as long as make lib works in the full config).
The text was updated successfully, but these errors were encountered:
I'm going to work on this enhancement. I added some experimental code in check_names.py to check the PSA words the same way as the MBED words. I found that unlike MBED words, not all of the PSA_XXX symbols (macros and enumeration) are defined in the headers so there would be false negative errors of 'likely typo' for these references(e.g. PSA_PAKE_SEQ_INVALID). Any suggestions for these symbols?
Possible solution: make check_names.py also look in .c files for definitions of macro/enum names.
Another possible solution, perhaps: does clang-tidy have an applicable check? It can enforce that defined identifiers have a certain prefix, but I haven't found a check that's similar to the typo part of check_names. So maybe in the medium term check_names.py could be simplified to only do the typo check, and the part about enforcing the namespace could be removed.
Add the following code to
include/mbedtls/check_config.h
:(you can't have the actual
#error
because that causes a build failure)Expectation:
tests/scripts/check_names.py
complains thatPSA_WANT_ALG_SHA256
is a likely typo (the correct spelling isPSA_WANT_ALG_SHA_256
). It would do so if the dependency was onMBEDTLS_SHA_256_C
(misspelled forMBEDTLS_SHA256_C
).Actual behavior as of 0fe6631:
tests/scripts/check_names.py
is happy (as long asmake lib
works in thefull
config).The text was updated successfully, but these errors were encountered: