The mldsa-native and mlkem-native headers use preprocessor tricks to
construct identifiers. We can't recognize those. So f a symbol found in the
binary is in the expected sub-namespace for those parts of the library,
allow it to be undeclared.
Make the exception general enough for mldsa-native (needed now) and
mlkem-native (needed soon).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
The pattern for internal macros was weird, in part, because of the unusual
short names we use in bignum code. Make the pattern stricter, but add an
exception mechanism. Declare an exception for those bignum names, but
allow them only in bignum code.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
I needed that to understand how the data is represented (str vs Match, list
vs set vs tuple, ...).
No semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Use a typed namespace instead of a dictionary with heterogenously typed values.
No semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
The include and exclude lists use different library functions which have
different semantics for wildcards.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Don't insist so much on exact directory and file names. In particular, be
tolerant to new subdirectories of `include` directories.
The resulting list of files is almost the same, except that a few more
Everest files are getting parsed, which is harmless (and perhaps technically
a bug fix).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
We now use CMake to build the Mbed TLS libraries
in both the development and 3.6 cases.
This change aligns with what is already done for
TF-PSA-Crypto.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Previously we allowed tf_psa_xyz / TF_PSA_XYZ. Change to allow only
tf_psa_crypto_xyz / TF_PSA_CRYPTO_XYZ.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Allow functions to have the prefix 'tf_psa' in check_names.py. This is
needed for new functions added in TF-PSA-Crypto.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Do not parse driver libraries anymore.
They are currently empty while we are
doing the transition to one crypto
library and will be removed soon.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit refactors TFPSACryptoCodeParser to throw exceptions for
usage in MbedTLS 3.6 as it is not compatible. This commit also removes
comments not related to building TF-PSA-Crypto.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit refactors MBEDTLSCodeParser to contain code necessary for
obtaining the required parse results from TF-PSA-Crypto.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit improves the documentation of check_names.py specifically
for the new class MBEDTLSCodeParser and TFPSACryptoCodeParser.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit fixes numerous pylint errors where possible. For simplicty,
it is easier to keep the many arguments instead of refactoring into an
object.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit separates CodeParser into three classes. CodeParser a base
class containing methods for parsing .c and .h files as well as
retrieving symbols from compiled libraries.
As well as two subclasses of CodeParser: TF-PSA-Crypto_CodeParser and
MBEDTLS_CodeParser, which are responsible for parsing the TF-PSA-Crypto
and Mbed TLS libraries.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
The following files are added (imported) from the main Mbed TLS repo:
scripts/check_names.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>