In preparation for reworking mbedtls_ssl_prepare_handshake_record(),
don't assert negatively on "reassembled record".
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
In preparation for reworking mbedtls_ssl_prepare_handshake_record(), tweak
the "waiting for more handshake fragments" log message in
ssl_consume_current_message(), and add a similar one in
mbedtls_ssl_prepare_handshake_record(). Assert both.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
The symmetric encryption used for transportation matters for TLS 1.2
defragmentation, since the code is sensitive to the presence of an
explicit IV. So have separate test cases for each class of symmetric
encryption.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
The output is identical to the manually written tests in
`tests/opt-testcases/handshake-manual.sh`, except that the script doesn't
generate explanatory comments (they're in the generator script instead).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit updates the filepath to demo_common.sh in dlopen_demo.sh and
the comment in demo_common.sh regarding how to use demo_common.sh.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit moves demo_common.sh, dlopen_demo.sh, metatest.c
query_compile_time_config.c, query_config.h, query_included_headers.c,
zeroize.c and test_zeroize.gdb from MbedTLS into the MbedTLS framework.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
components-compliance.sh has been moved from the Mbed TLS repo to the
TF-PSA-Crypto one. This means that the test_psa_compliance.py script
can be executed in the following scenarios:
* TF-PSA-Crypto repo in development branch;
* Mbed TLS repo in mbedtls-3.6 branch.
This commit includes all the required changes to make the script working
in both scenarios. It also fixes some paths management making them more
pythonic.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit adapts the scripts apidoc_full.sh and doxygen.sh to run for
TF-PSA-Crypto out of source builds.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
The script had small differences between the development branch and the
mbedtls-3.6 ones. The goal of this commit is to reconcile those
differences in order to make it usable from both branches. This is
necessary now that the scripts lives in the framework repo.
Signed-off-by: Valerio Setti <vsetti@baylibre.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>
The following files are added (imported) from the main Mbed TLS repo:
scripts/test_psa_compliance.py
scripts/test_psa_constant_names.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
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>
As TF-PSA-Crypto is now a seperate repository, the license does not need
to be checked alongside Mbed TLS and instead has a seperate check.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This call into the "old" script that has been moved to the framework
repository. The *.requirements.txt files are kept on this repo though.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
The following files are moved to the framework repo (deleted here):
scripts/min_requirements.py
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
- prevent the file from being called directly from the command line;
- allow to pass in the default requirement file so that each repo
can specify its own version.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>