Commit Graph

12086 Commits

Author SHA1 Message Date
Ronald Cron
f3720c7ca9
Merge pull request #9828 from ronald-cron-arm/finalize-split-preparation-2
Finalize split preparation-2
2024-12-11 14:07:27 +00:00
Janos Follath
54f19e5372
Merge pull request #9783 from gilles-peskine-arm/psa-storage-test-cases-never-supported-preliminaries-dev
Make some edge cases of not-supported or invalid mechanisms more uniform
2024-12-10 18:15:54 +00:00
Ronald Cron
bced0c782d Fix check that psa_test_wrappers.[hc] are up to date
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:58:02 +01:00
Ronald Cron
9fb40d7e01 Move PSA documentation to tf-psa-crypto
Move the docuumentation files that after
the split will fit better in TF-PSA-Crypto
than Mbed TLS. No comment update.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
faadfc2513 cmake: Remove unnecessary file generation disablement
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
3dd1d3d1de Fix test_sha3_variations
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
42ba65d892 Fix test_malloc_0_null
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
bfa03a2c3a Fix build_zeroize_checks
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
b7adf7bb77 Fix tls13_only
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
9d262d7c13 Fix test_ccm_aes_sha256
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
5096b4cb4b Revert "Remove mbedtls_test"
This reverts commit 939ce9d0d5.

Build mbedtls_test library of objects to link
with TLS and x509 test suites and programs
with mbedtls framework not TF-PSA-Crypto
one (when it will be there).

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:49 +01:00
Ronald Cron
f6eee5ad55 Move test_keys.h to include/test
Move test_keys.h to tests/include/test
instead of tests/src as it is used
outside of tests/src namely by
test_suite_pk.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:56:42 +01:00
Ronald Cron
cec78c33df libtesdriver1: Copy only scripts from framework
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:54:05 +01:00
Ronald Cron
ce3bcf04d8 Restore 3.6 PSA constants generation check
Just to ease the eventual migration
of check-generated-files.sh to
the framework.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-10 16:54:05 +01:00
Gilles Peskine
eafc2751e6 Fix edge case with half-supported ECDSA (manual test cases)
ECDSA has two variants: deterministic (PSA_ALG_DETERMINISTIC_ECDSA) and
randomized (PSA_ALG_ECDSA). The two variants are different for signature but
identical for verification. Mbed TLS accepts either variant as the algorithm
parameter for verification even when only the other variant is supported,
so we need to handle this as a special case when generating not-supported
test cases.

In this commit:

* Add manually written not-supported test cases for the signature
  operation when exactly one variant is supported.
* Add manually written positive test cases for the verification
  operation when exactly one variant is supported.
* Register that !ECDSA but DETERMINISTIC_ECDSA is not tested yet
  (https://github.com/Mbed-TLS/mbedtls/issues/9592).

A commit in the framework will take care of automatically generated test cases.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-12-09 18:31:59 +01:00
Elena Uziunaite
9f5487406d Adapt paths for scripts/quiet
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:35:04 +00:00
Elena Uziunaite
d92e24e83f Adapt paths for output_env.sh
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:35:04 +00:00
Elena Uziunaite
7b51437f8c Move files out of Mbed TLS
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-12-09 15:35:04 +00:00
Manuel Pégourié-Gonnard
4a8e8f84d9
Merge pull request #9666 from Harry-Ramsey/remove-obsolete-ci-scripts-development
Remove obsolete CI Scripts
2024-12-09 10:49:45 +00:00
Ronald Cron
a13d4049ba
Merge pull request #9717 from Harry-Ramsey/move-programs-psa-tf-psa-crypto-development
Move programs/psa to tf-psa-crypto
2024-12-09 07:38:16 +00:00
Ronald Cron
ce3c2dd30c
Merge pull request #9806 from ronald-cron-arm/finalize-split-preparation-1
Finalize split preparation-1
2024-12-05 13:23:09 +00:00
Minos Galanakis
4ce27cb49b ssl-opt: CONFIGS_ENABLED list should always end with a space char.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 15:08:39 +00:00
Minos Galanakis
848333de3a analyze_outcomes: Moved migrated to ts-psa-crypto tests cases.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 15:08:39 +00:00
Ronald Cron
6a2cbe77fa Move driver wrappers generation to tf-psa-crypto
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-04 14:25:02 +01:00
Ronald Cron
6924564970 Move back timing.c to mbedtls
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-04 14:25:02 +01:00
Ronald Cron
18047f0b01 Move config_adjust_legacy_crypto.h to tf-psa-crypto
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-04 14:25:02 +01:00
Ronald Cron
3ed75c5b4f Move psa_test_wrappers.h/c to tf-psa-crypto
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-04 14:25:02 +01:00
Minos Galanakis
a8c85f8a93 check_names: Updated macro regex to accept TF_PSA_X names.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 10:41:11 +00:00
Minos Galanakis
a17ffc7a0b test suites: Refactored component_test_ccm_aes_sha256.
This commit moves the tf-psa-crypto configuration options
for this test to `crypto-config-ccm-aes-sha256.h`.

A blank MbedTLS configuration file is now used for the library
side.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 10:41:11 +00:00
Minos Galanakis
473241e5b2 build_cmake_custom_config_file: Added test coverage for crypto_user_config.h
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 10:41:11 +00:00
Minos Galanakis
00b641c206 test_components: Updated config.py to use -c for setting CRYPTO_CONFIG_H entries.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
2154ce2040 component_test_ccm_aes_sha256: Workaround for split libtestdriver config.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
4f619e12e7 Renamed MBEDTLS_PSA_CRYPTO_CONFIG_FILE & MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Files have been renamed respectively to:
- TF_PSA_CRYPTO_CONFIG_FILE
- TF_PSA_CRYPTO_USER_CONFIG_FILE

As per design proposal:
https://github.com/Mbed-TLS/mbedtls/blob/development/docs/proposed/config-split.md

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
c6e58aa4ac test_memsan_constant_flow_psa: Set to not re-generate files.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
5da58e5c18 tests/configs: Adjusted for migration of MBEDTLS_PSA_CRYPTO_CONFIG_FILE.
Moving forward the MBEDTLS_PSA_CRYPTO_CONFIG_FILE now resides in the
ts-psa/crypto configuration. This patch removes it from the library
configuration files, and updates the tests to explicitely use it.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
4f7f132536 test-data: Adjusted check-feature test to seek MBEDTLS_TIMING_C.
Features are generated by scripts/generate_features.pl which will reside
in the MbedTLS repository, while MBEDTLS_AES_C now resides in tf-psa-crypto.

Picking `MBEDTLS_TIMING_C` feature ensures the original test's requirements
are satisfied.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
981d7d67e1 test-suites: Replaced NIST_KW_C with SSL_ALL_ALERT_MESSAGES
`MBEDTLS_NIST_KW_C` resides in tf-psa-crypto. This commit updates
the tests using it to use `SSL_ALL_ALERT_MESSAGES` instead.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
473b9609e8 components-build-system: Added support for psa_crypto custom configuration file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
aa2f12cc8e component-configuration-crypto: Set user-config-for-test as the MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Minos Galanakis
23452f5c0b libtestdriver: Addded crypto_config_test_driver
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-12-04 09:57:56 +00:00
Harry Ramsey
fe81cfeac3 Refactor scripts to use config.py instead of config.pl
This commit refactors scripts to use config.py which replaces config.pl.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 16:23:06 +00:00
Harry Ramsey
c6d2e4ecfc Remove obsolete tcp_client.pl
This commit removes tcp_client.pl and removes it from ssl-opt.sh as it
has been replaced by test_suite_ssl.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 16:23:06 +00:00
Harry Ramsey
cff96f600a Remove obsolete Travis CI scripts
This commit removes obsolete Travis CI scripts that are no longer
required due to the transition to a publically available CI image.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 16:23:06 +00:00
Harry Ramsey
0569c017c8 Remove obsolete Docker CI scripts
This commit removes Docker CI scripts from the repository as they are no
longer necessary with CI images being publically available.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 16:23:06 +00:00
Harry Ramsey
cbd00b0563 Fix check-generated-files.sh generate_psa_constants.py path
This commit fixes the path to generate_psa_constants.py in
check-generatedfiles.sh

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-12-02 15:48:27 +00:00
Paul Elliott
017722f043
Merge pull request #9785 from waleed-elmelegy-arm/add-iop-export-pub-key-setup-abort
Add PSA interruptible export public-key setup & abort APIs
2024-11-29 21:07:34 +00:00
Waleed Elmelegy
b30233f6c3 Change key param to mbedtls_svc_key_id_t in psa_export_public_key_iop_setup()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-27 16:08:01 +00:00
Elena Uziunaite
8993fecae4 Define FRAMEWORK
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:15:04 +00:00
Elena Uziunaite
ef40183c34 Use new functions
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-11-27 13:15:04 +00:00
Ronald Cron
28a26ece1d
Merge pull request #9771 from ronald-cron-arm/remove-psa-crypto-config
Remove MBEDTLS_PSA_CRYPTO_CONFIG configuration option
2024-11-21 16:57:55 +00:00