Commit Graph

1666 Commits

Author SHA1 Message Date
Ronald Cron
3486950893 Adapt make_generated_files.bat
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
c51b0d1863 Adapt bump_version.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
5903be2404 Adapt abi_check.py
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
9e2ff40850 Adapt code_style.py
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
f250cf6ce2 common.make: Use dedicated env variable
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
2fd621ebe9 Adapt code_style.py
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
aef8cf3b2e Adjust build systems
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:40 +02:00
Ronald Cron
381247eda5 Adapt check-generated-files.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:10:37 +02:00
Ronald Cron
c29afb684e Adjust build systems
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:07:38 +02:00
Ronald Cron
fe3ad99af3
Merge pull request from davidhorstmann-arm/move-test-data-files-to-framework
Move test data files to framework
2024-07-09 11:56:14 +00:00
David Horstmann
dcf18dd876 Update paths pointing to tests/data_files
These now point to framework/data_files instead.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-07-05 15:49:03 +01:00
Thomas Daubney
9da1769237 Remove MBEDTLS_ECP_ALT and associated options
Also removed are all options of the form
MBEDTLS_ECP_XXX_ALT as well as
MBEDTLS_ECP_NO_FALLBACK.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-05 14:35:10 +01:00
Ronald Cron
5e3c529614
Merge pull request from gilles-peskine-arm/test_suite_config-booleans
Report configuration settings in the outcome file
2024-07-03 13:09:07 +00:00
Valerio Setti
0917265014 makefile: allow to build and link test suites against psasim
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 15:45:55 +02:00
Gilles Peskine
1b22dd8765 Merge remote-tracking branch 'dev' into test_suite_config-booleans
Reconcile the framework submodule heads to the latest one.
2024-07-02 14:24:27 +02:00
Ronald Cron
3d817add46 Adjust build systems
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-01 14:59:35 +02:00
Ronald Cron
f0481f562a
Merge pull request from tom-daubney-arm/drop_padlock_support
Drop support for VIA Padlock
2024-06-26 07:36:04 +00:00
Thomas Daubney
0d915a90ea Remove final references to padlock
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-20 16:45:51 +01:00
Gilles Peskine
e154e6fe51 Generate config test cases for single options
Generate option-on and option-off cases for test_suite_config, for all
boolean options (MBEDTLS_xxx and PSA_WANT_xxx, collected from the mbedtls
and PSA config files).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:12:48 +02:00
Gilles Peskine
9ba9c21c61 Recognize that a double-inclusion guard is not a config setting
Fix PSA_CRYPTO_CONFIG_H being treated as a configuration setting in
include/psa/crypto_config.h.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-20 17:10:24 +02:00
Ronald Cron
7e5d61c41a Adjust more paths to PSA headers
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:51:20 +02:00
Ronald Cron
c7e9e367bb Adjust build systems
Adjust build systems such as we can build
Mbed TLS in the default and full configuration.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:02:24 +02:00
David Horstmann
f8bbc2d532 Remove multi-type variable
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 16:16:31 +01:00
David Horstmann
330680e9fe Allow code_style.py to work from a git hook
When running a git hook, git sets certain environment variables (such
as GIT_INDEX_FILE) which force git to look at the main repository,
overriding other options. This trips up code_style.py whenever it
tries to run a git command on the framework submodule.

Fix this by explicitly clearing git-related environment-variables
before running git commands on the framework. This is recommended
by git's documentation[1]:

> Environment variables, such as GIT_DIR, GIT_WORK_TREE, etc., are
> exported so that Git commands run by the hook can correctly locate
> the repository. If your hook needs to invoke Git commands in a
> foreign repository or in a different working tree of the same
> repository, then it should clear these environment variables so
> they do not interfere with Git operations at the foreign location.

[1] https://git-scm.com/docs/githooks

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 15:25:10 +01:00
Bence Szépkúti
c085cc767d
Merge pull request from davidhorstmann-arm/move-test-generation-files
Move test generation files to framework
2024-06-04 09:23:17 +00:00
David Horstmann
f6f3bcae43 Update file paths for moved files
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
David Horstmann
b8360cf3ca Make abi_check.py look in both locations
To deal with situations where we are comparing revisions before and
after the move of generate_psa_tests.py to the framework, look for
it in both the old and new locations.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:48:55 +01:00
Gilles Peskine
d961929615
Merge pull request from ttytm/fix-typo
fix typo
2024-05-30 17:24:55 +00:00
Gilles Peskine
c15544e217
Merge pull request from ronald-cron-arm/check-framework-files
Extend basic checks and C coding style check to framework files
2024-05-30 17:24:18 +00:00
Thomas Daubney
bbb41f7afb Modify lcov.sh to use new project name file
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-30 09:38:22 +01:00
Thomas Daubney
c0386bf2a7 Introduce project_name.txt
This file is used for detecting which project a script is being
run from.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-30 09:27:27 +01:00
Turiiya
27098b458b fix typo
Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
2024-05-18 18:08:12 +02:00
David Horstmann
ecd6d01023 Rename framework_path to framework_scripts_path
This name is more descriptive of its purpose, since it actually adds
framework/scripts to the path rather than just framework/

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:38 +01:00
David Horstmann
875c32fa07 Add framework_path module
This allows scripts in the scripts/ directory to get the path to the
mbedtls_framework module in framework/scripts/

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:38 +01:00
David Horstmann
cd84bb287b Update references to mbedtls_dev
Change these to point to the new mbedtls_framework module in the
framework submodule.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:29 +01:00
David Horstmann
6343a83057 Move some files to framework repository
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 13:48:13 +01:00
Ronald Cron
62a908d869 Extend C code style check to framework files
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-02 16:53:23 +02:00
Valerio Setti
455fb4e803 generate_test_cert_macros: embed input args
- Embed input arguments inside the script so as to simplify the
  calls in Makefiles/CMakeLists.
- add a new "--list-dependencies" command line option to print
  out the list of dependencies.
- Modify tests/Makefile accordinlgy.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-04-29 17:16:41 +02:00
Valerio Setti
96daf67701 fix "make generated_files" for test_keys.h and test_certs.h
This also add the check in tests/scripts/check-generated-files.sh

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-04-29 17:16:41 +02:00
Manuel Pégourié-Gonnard
024d3daa7d
Merge pull request from valeriosetti/issue8871
Improve test key generation in test_suite_pk
2024-04-29 09:25:37 +00:00
Valerio Setti
776dce51d3 asymmetric_key_data: fix public RSA-2048 key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-04-15 17:41:21 +02:00
Valerio Setti
6bda5f5717 generate_test_keys: use keys from asymmetric_key_data.py
asymmetric_key_data.py already provides EC/RSA key pair values that
are suitable for generate_test_keys.py. So instead of re-generating
the keys using gen_key program, we use those keys.

This commit also:
- extends asymmetric_key_data.py to introduce
RSA bit sizes that are used in test_suite_pk but were missing from
asymmetric_key_data.py.
- updates test_keys.h with new keys.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-04-10 12:33:21 +02:00
Minos Galanakis
96948e9a7b Merge pull request from adeaarm/fix_jinja_template
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-22 11:44:46 +00:00
Antonio de Angelis
700632eca2 Fix #ifdef guard in driver wrapper template
The #ifdef guard in the get_builtin_key() should be
PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT to allow for
multiple drivers to be plugged into the wrapper.

Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
2024-03-22 11:43:19 +00:00
Minos Galanakis
b70f0fd9a9 Merge branch 'development' into 'development-restricted'
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-19 22:24:40 +00:00
Dave Rodgman
1bd787a3e0 Minor relaxation to auto-gen regex
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-18 12:32:49 +00:00
Dave Rodgman
4e4540d8e0 line length fix
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-18 11:55:39 +00:00
Dave Rodgman
2a9eb22107 Check file content to see if it looks auto-generated
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-18 11:16:05 +00:00
Bence Szépkúti
567591eec7
Merge pull request from bensze01/drop-old-compilers
Drop Support for MSVC 2013, 2015 and Arm Compiler 5
2024-03-15 12:56:21 +00:00
David Horstmann
6f8c95ba1d Preserve alphabetical sorting of config options
In the list that is excluded from the full config.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 14:52:45 +00:00
David Horstmann
5a71e76e65 Remove MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS from full
This option removes a feature (buffer protection) so should not be
in the full config.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 14:47:48 +00:00
Gilles Peskine
5c77ad0f4f
Merge pull request from gilles-peskine-arm/lcov-cannot-write-investigation
Work around a bug in ancient lcov
2024-03-13 17:52:15 +00:00
Gilles Peskine
539d7d54af Work around a bug in ancient lcov
lcov had a bug whereby it tries to create the output file relative to /
if it has emitted a warning. We do CI runs on Ubuntu 16.04 which is too
old to have the fix. As a quick fix for the CI, work around the bug.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-03-13 17:19:17 +01:00
Dave Rodgman
775c7768ee
Merge pull request from gilles-peskine-arm/split-minimal-3.6
Create a minimal framework submodule
2024-03-13 14:30:09 +00:00
Bence Szépkúti
0719d7c3d8 Update the MSBuild toolset versions to VS2017
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-03-13 11:23:16 +01:00
Bence Szépkúti
fac1122b85 Rename solution files to referece VS2017
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-03-13 11:23:16 +01:00
David Horstmann
93fa4e1b87 Merge branch 'development' into buffer-sharing-merge 2024-03-12 15:05:06 +00:00
Gilles Peskine
f9bbe0de4c Show guidance if the framework is not found
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-03-04 17:12:59 +01:00
Gilles Peskine
469f7811fa Require framework directory to exist when building
The framework directory will be provided by a submodule.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-29 18:19:56 +01:00
Gilles Peskine
8988767b0e Use attribute accessor functions in driver wrappers
Fully automated:
```
perl -i -pe 's/(\w+)->core\.(\w+)/psa_get_key_$2($1)/g' scripts/data_files/driver_templates/*.jinja docs/psa-driver-example-and-guide.md
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-28 01:29:13 +01:00
Gilles Peskine
092ce51c47 Rename "key generation method" to "key production parameters"
"Key generation method" was misleading since it also applies to key
derivation. Change "key generation" to "key production", which we aren't
using yet and has roughly the right intuition. Change "method" to
"parameters" which there seems to be a slight preference for. Discussion
thread: https://github.com/Mbed-TLS/mbedtls/pull/8815#discussion_r1486524295

Identifiers renamed:
psa_key_generation_method_t → psa_key_production_parameters_t
psa_key_generation_method_s → psa_key_production_parameters_s
PSA_KEY_GENERATION_METHOD_INIT → PSA_KEY_PRODUCTION_PARAMETERS_INIT
method → params
method_data_length → params_data_length
default_method → default_production_parameters
psa_key_generation_method_is_default → psa_key_production_parameters_are_default
setup_key_generation_method → setup_key_production_parameters
key_generation_method_init → key_production_parameters_init

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-20 16:18:13 +01:00
Gilles Peskine
69f11c8dfb generate key ext: skip driver invocation with non-default method
In the driver wrapper for psa_generate_key() and psa_generate_key_ext():

* Invoke the built-in code if using a non-default method, even if there
  might be an accelerator. This is ok because we only support non-default
  methods for RSA and we don't support driver-only RSA, therefore a
  non-default method will always have built-in code behind it.
* Return NOT_SUPPORTED if trying to use a non-default method with an opaque
  driver.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-15 11:57:48 +01:00
Gilles Peskine
c81393b2ed generate/derive key ext: pass method_data_length rather than method_length
Instead of passing the size of the whole structure, just pass the data
length and let the implementation worry about adding the size of the
structure. The intent with passing the structure size was to allow
the client code in a client-server implementation to know nothing
about the structure and just copy the bytes to the server. But that was not
really a useful consideration since the application has to know the
structure layout, so it has to be available in the client implementation's
headers. Passing the method data length makes life simpler for everyone by
not having to worry about possible padding at the end of the structure, and
removes a potential error condition
(method_length < sizeof(psa_key_generation_method_t)).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-15 11:57:48 +01:00
Gilles Peskine
7a18f9645c psa_generate_key_ext: RSA: support custom public exponent
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-15 11:57:46 +01:00
Janos Follath
7a28738205
Merge pull request from paul-elliott-arm/new_test_thread_interface
New test thread interface
2024-02-08 12:35:40 +00:00
Dave Rodgman
047c724c22 Merge remote-tracking branch 'restricted/development-restricted' into update-development-r
Conflicts:
	programs/Makefile
	tests/scripts/check-generated-files.sh
2024-01-26 12:42:51 +00:00
Valerio Setti
48a847afb7 tests: add guards for DH groups
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-01-17 15:57:06 +01:00
Gilles Peskine
89b50a7cb4 Fix parsing of C line comments
Fix // comments stopping on 'n' instead of newlines. Also allow
backslash-newline in // comments.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-15 19:30:54 +01:00
Gilles Peskine
a1871f318b Add review exception warning
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-15 19:30:28 +01:00
Gilles Peskine
f838eb2259 Guard the macro definition
It doesn't make sense to define a macro expanding to a non-existent function.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-15 19:03:08 +01:00
Gilles Peskine
d022093ea6 C function wrapper generator
The Base class generates trivial wrappers that just call the underlying
function. It is meant as a base class to construct useful wrapper generators.

The Logging class generates wrappers that can log the inputs and outputs to
a function.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-15 19:03:08 +01:00
Gilles Peskine
00ed38c25b Python module to parse function declarations from a header file
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-15 19:03:08 +01:00
Waleed Elmelegy
f37c70746b Add MBEDTLS_SSL_RECORD_SIZE_LIMIT to full config
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-01-10 16:17:28 +00:00
Manuel Pégourié-Gonnard
454ab28be5
Merge pull request from gilles-peskine-arm/asymmetric_key_data-secpr1
Fix incorrect test data for SECP_R1 in automatically generated tests
2024-01-09 09:21:14 +00:00
Paul Elliott
7ed1cf57ba Enable common.make to be included by programs/fuzz
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-01-05 21:04:59 +00:00
Gilles Peskine
68b5182dad Add test data for secp192r1
Same generation methodology as 0cbaf056fa:

```
openssl genpkey -algorithm ec -pkeyopt ec_paramgen_curve:P-192 -text |perl -0777 -pe 's/.*\npriv:([\n 0-9a-f:]*)pub:([\n 0-9a-f:]*).*/"$1","$2"/s or die; y/\n ://d; s/,/,\n              /;'
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-03 20:57:52 +01:00
Gilles Peskine
478dd84b63 Fix mixup between secp224r1 and secp224k1 in test scripts
secp224k1 is the one with 225-bit private keys.

The consequences of this mistake were:

* We emitted positive test cases for hypothetical SECP_R1_225 and
  SECP_K1_224 curves, which were never executed.
* We emitted useless not-supported test cases for SECP_R1_225 and SECP_K1_224.
* We were missing positive test cases for SECP_R1_224 in automatically
  generated tests.
* We were missing not-supported test cases for SECP_R1_224 and SECP_K1_225.

Thus this didn't cause test failures, but it caused missing test coverage
and some never-executed test cases.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-03 20:50:56 +01:00
Gilles Peskine
0ae58dd985 Unify MBEDTLS_TEST_OBJS
`$(MBEDTLS_TEST_OBJS)` included TLS-specific test support modules in
`tests/Makefile` but not in `programs/Makefile`. This difference is not
actually necessary. What is necessary is that all programs that use
functions from TLS-specific test support modules are linked with those
modules in addition to `-lmbedtls`, and programs that are not linked with
`-lmbedtls` are not linked with TLS-specific test support modules. Since we
always pass `-lmbedtls` when linking programs in `programs/Makefile`, we can
link with the TLS-specific test support modules as well. This keeps things
simpler.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-02 23:11:24 +01:00
Gilles Peskine
cd06a813c6 Fix name in documentation
fixup "Correct name and documentation of preprocessor symbol check function"

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-02 18:14:40 +01:00
Gilles Peskine
570e54822c Finish unifying LOCAL_CFLAGS
fixup "Create common.make with LOCAL_CFLAGS and friends"

The code wasn't what I had intended, although it was functionally
equivalent. Make it more readable and more robust.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-02 18:11:10 +01:00
Gilles Peskine
f3316f132b Correct name and documentation of preprocessor symbol check function
It's not remove_unset_options, it's remove_enabled_options (or
keep_disabled_options).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 18:30:37 +01:00
Gilles Peskine
2337a3b886 Explain the use of control
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 14:16:21 +01:00
Gilles Peskine
21570cf232 Auto-detect the need to link with pthread on Unix-like platforms
When building with Make on a Unix-like platform (shell and compiler),
auto-detect configurations that may require linking with pthread.

This removes the need for MAKE_THREADING_FLAGS in all.sh.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:53:42 +01:00
Gilles Peskine
4392fc101f Unify some common rules of programs/Makefile and tests/Makefile
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:49:35 +01:00
Gilles Peskine
076fd25480 Unify common variables of programs/Makefile and tests/Makefile
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:56 +01:00
Gilles Peskine
f3d1ae1f05 Create common.make with LOCAL_CFLAGS and friends
Create a common.make for definitions that are shared between tests/Makefile
and programs/Makefile, to facilitate maintenance. Start populating it with
CFLAGS/LDFLAGS variables. More to follow in subsequent commits.

Keep library/Makefile independent, at least for the time being.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:56 +01:00
Gilles Peskine
b4362d2cc7
Merge pull request from tom-daubney-arm/modify_check_generated_files_script
Modify check generated files script to work with TF PSA Crypto too
2023-12-11 21:15:00 +00:00
Thomas Daubney
f05b768457 Use existing variable containing full path
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-12-08 09:47:48 +00:00
Gilles Peskine
42d78c73b7
Merge pull request from gabor-mezei-arm/tf_psa_crypto_change_log_support
Modify changelog assembly to work with tf-psa-crypto
2023-12-06 18:25:49 +00:00
Gabor Mezei
fe23daf8a3
Remove leftover code from initial changelog support
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-12-04 14:37:31 +01:00
Thomas Daubney
04c446cc21 Modify crypto_core_directory to also return a relative path
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-12-01 17:18:38 +00:00
Thomas Daubney
99030e2a50 Remove trailing whitespace
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-12-01 09:52:35 +00:00
Thomas Daubney
db80b2301c Introduce guess_tf_psa_crypto_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 17:33:54 +00:00
Thomas Daubney
d1f2934e78 Introduce guess_mbedtls_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 17:27:42 +00:00
Thomas Daubney
56bee0344e Rename variable for better clarity
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 14:33:35 +00:00
Thomas Daubney
46588de8fc Improve documentation of crypto_core_directory
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 13:59:30 +00:00
Thomas Daubney
08c6dc4942 Rename project_crypto_name
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-30 13:56:09 +00:00
Thomas Daubney
cdbf2fd644 Add documentation for new public functions
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:54:56 +00:00
Thomas Daubney
beec452e3c Use os.path.join in crypto_core_directory
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-24 10:48:44 +00:00
Dave Rodgman
8cd4bc4ac2
Merge pull request from yanrayw/support_cipher_encrypt_only
Support the negative option MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
2023-11-23 17:43:00 +00:00
Thomas Daubney
8932404c45 Introduce project_crypto_name in build_tree.py
Add new function to build_tree.py to return the crypto
name for the project; either tfpsacrypto or mbedcrypto.
Deploy this function where needed.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-23 10:14:12 +00:00
Yanray Wang
42be1bab30 block_cipher_no_decrypt: improve comment
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-23 14:34:41 +08:00
Yanray Wang
690ee81533 Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only 2023-11-23 10:31:26 +08:00
Thomas Daubney
755d32117b Rename guess_mbedtls_root to guess_project_root
Rename for consistency. Also, replace all calls to
this function with correct name.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 17:18:22 +00:00
Thomas Daubney
d35b94b662 Improve implementation of crypto_core_directory
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 17:04:02 +00:00
Gabor Mezei
4e574dbd43
Remove initial changelog entry creation support
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-11-22 17:48:00 +01:00
Thomas Daubney
772056ccea Replace repo_root with project_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 16:23:16 +00:00
Thomas Daubney
b42c50bd60 Make use of new crypto_core_directory function
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 15:53:38 +00:00
Thomas Daubney
79cae20a02 Remove useless line
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 15:49:19 +00:00
Minos Galanakis
31dbc3613a prepare_release: sed querry change to strip whitespace
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-11-22 14:23:12 +00:00
Gabor Mezei
8933c04e44
Enable to specify the name of the project in the changelog
The name read out from the previous entry.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-11-21 17:05:43 +01:00
Gabor Mezei
ddffa10264
Initial changelog support for changelog assembling
Add an initial changelog if no entries found un the changelog.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-11-21 17:03:29 +01:00
Gilles Peskine
885bcfc9d0
Merge pull request from yuhaoth/pr/add-command-for-server9-bad-saltlen
Add command for server9-bad-saltlen
2023-11-20 14:07:19 +00:00
Gilles Peskine
6267dd59c8
Merge pull request from gilles-peskine-arm/metatest-create
Create a metatest program
2023-11-20 14:07:08 +00:00
Thomas Daubney
13ecb691a3 Introduce function to return library/core directory
Add crypto_core_directory in build_tree.py so that
the libary/core directory can be returned based
on what repository we are in.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-16 18:34:58 +00:00
Thomas Daubney
5556f908cb Rename variables in script
Rename some variables in generate_driver_wrappers.py
now that the script has to work in two repositories
as opposed to just mbed tls.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-15 16:50:23 +00:00
Manuel Pégourié-Gonnard
9e80a91f27
Merge pull request from yanrayw/adjust_tfm_configs
Adjust how we handle TF-M config files
2023-11-15 08:21:27 +00:00
Thomas Daubney
4291bc27b9 Remove trailing whitespace
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 18:05:19 +00:00
Thomas Daubney
c1750bb23d Apply correct license to generate_driver_wrappers.py
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 15:16:38 +00:00
Thomas Daubney
0bb761cc2f Remove further extraneous whitespace in lcov script
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 12:03:10 +00:00
Thomas Daubney
b10cc7acc2 Modify generate_driver_wrappers.py to work in both repos
Add repository detection and conditional setting of
library_dir variable.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 12:02:26 +00:00
Thomas Daubney
b4f1ee0566 Remove superfluous leading whitespace
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-13 09:50:58 +00:00
Yanray Wang
19583e44ed psa_information: improve code readability
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-13 17:43:37 +08:00
Yanray Wang
70743b02df psa_information: compile a regex instead of using string directly
Compiling a regex improves performance and avoids accidentally
combining it with a string. This commit makes this change.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-09 16:13:55 +08:00
Ronald Cron
f95b678729 Remove unused *.cocci files
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-11-08 10:08:09 +01:00
Yanray Wang
30769696e7 Merge remote-tracking branch 'origin/development' into adjust_tfm_configs 2023-11-08 10:00:24 +08:00
Gilles Peskine
a1023e2bd6 programs/test/metatest indirectly includes library/common.h
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-06 20:33:19 +01:00
Paul Elliott
e03270f2e0
Merge pull request from paul-elliott-arm/full_no_platform
Add full_no_platform config preset
2023-11-06 11:35:28 +00:00
Yanray Wang
be08908564 config.py: exclude MBEDTLS_BLOCK_CIPHER_NO_DECRYPT from full
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:01:42 +08:00
Gilles Peskine
0c29963265
Merge pull request from daverodgman/license-change
License change
2023-11-04 15:47:07 +01:00
Yanray Wang
6b190d4f27 psa_information.py: generate dep for AES/ARIA/CAMELLIA ECB test case
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-03 17:37:22 +08:00
Dave Rodgman
16799db69a update headers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-02 19:47:20 +00:00
Paul Elliott
fc31cb28ee
Merge pull request from tom-daubney-arm/modify_lcov_script_tf_psa_crypto
Modify lcov.sh to work in tf-psa-crypto as well
2023-11-02 15:56:21 +00:00
Yanray Wang
5779096753 Merge remote-tracking branch 'origin/development' into adjust_tfm_configs 2023-10-31 13:39:07 +08:00
Jerry Yu
6f21dd5694 move script to tests/scripts
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-24 15:45:41 +08:00
Jerry Yu
baf7ba44c4 improve document
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-24 15:44:00 +08:00
Jerry Yu
974be516dc move asn1crypto to ci.requirements.txt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-24 15:42:30 +08:00
Thomas Daubney
c0ae569066 Make lcov.sh run from the build directory
lcov.sh can now be called from any build directory and
also still works with in-place builds too.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-23 17:25:52 +01:00
Dave Rodgman
514590210b Merge remote-tracking branch 'origin/development' into sha-armce-thumb2
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-23 15:35:07 +01:00
Paul Elliott
fb81f77f88 Add build preset full_no_platform
Add build preset as above, and utilise it in
all.sh:component_test_no_platform.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-10-20 15:53:44 +01:00
Thomas Daubney
11120f9c4d Modify lcov.sh to work in tf-psa-crypto as well
Add repository detection (credit to davidhorstmann-arm
for adding this in all.sh previously) and use repository
detection to set the library directory and title
variables.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-19 15:54:52 +01:00
Yanray Wang
08e9423f14 Merge remote-tracking branch 'origin/development' into adjust_tfm_configs 2023-10-19 17:44:47 +08:00
Manuel Pégourié-Gonnard
2e37d7b238
Merge pull request from gilles-peskine-arm/ssl-test-no-legacy
Remove GNUTLS_LEGACY and OPENSSL_LEGACY
2023-10-18 07:13:12 +00:00
Jerry Yu
2f3f968033 fix wrong typo and indent issue
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-18 15:07:10 +08:00
Jerry Yu
09977e2307 Add asn1crypto to python maintainer requirements
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-18 15:07:09 +08:00
Jerry Yu
a3d911b0ae add script for server9_bad_saltlen
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-10-18 15:07:09 +08:00
Dave Rodgman
7cb635a563 Adjust the full config
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:14:51 +01:00
Dave Rodgman
9be3cf0776 Fix a couple of typos related to renaming options
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 14:47:55 +01:00
Dave Rodgman
b0d9830373
Merge branch 'development' into sha-armce-thumb2
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 13:53:41 +01:00
Dave Rodgman
be7915aa6c Revert renaming of SHA512 options
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 10:59:05 +01:00