Commit graph

1127 commits

Author SHA1 Message Date
David Horstmann
76a7738537 Invert logic for repo detection in all.sh
Instead of:
    ! in_psa_crypto_repo()
use
    in_mbedtls_repo()

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
9a6c45b436 Make all.sh PSA-crypto-friendly
Introduce changes needed to run all.sh in the psa-crypto repo. Where
behaviour must differ, detect that we are in the psa-crypto repo by
checking for the 'core' directory.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:11 +01:00
Gilles Peskine
796bc2b8f9
Merge pull request #7486 from AndrzejKurek/calloc-also-zeroizes
Document mbedtls_calloc zeroization
2023-08-21 15:47:21 +00:00
Dave Rodgman
1fdc884ed8
Merge pull request #7384 from yuhaoth/pr/add-aes-accelerator-only-mode
AES: Add accelerator only mode
2023-08-18 20:55:44 +00:00
Jerry Yu
f258d17acd remove aesni + padlock - plain c tests
This test is not valid for padlock depends
on plain c

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-17 12:39:00 +08:00
Jerry Yu
bdd96b9adf disable aesni for componets without cpu modifiers
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 17:34:27 +08:00
Jerry Yu
506759f5ce fix build fail for via padlock test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 17:11:22 +08:00
Jerry Yu
b6d39c2f8c Add aesni test for i386
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-16 16:14:02 +08:00
Dave Rodgman
963513dba5
Merge pull request #8008 from valeriosetti/issue7756
driver-only ECC: BN.TLS testing
2023-08-11 13:51:36 +00:00
Tom Cosgrove
5e678fd4d2
Merge pull request #8050 from gilles-peskine-arm/all.sh-remove-crypto_full_no_cipher
Remove redundant test component component_test_crypto_full_no_cipher
2023-08-11 07:28:10 +00:00
Valerio Setti
18535c352d test: enable TLS, key exchances and ssl-opt teting in ecc_no_bignum()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:33:52 +02:00
Valerio Setti
29c1b4d04a test: enable X509 testing in ecc_no_bignum component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 14:50:03 +02:00
Gilles Peskine
f5a29a5b83 Remove redundant test component
component_test_crypto_full_no_cipher doesn't bring any extra value given the
existence of component_test_full_no_cipher.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-10 12:07:49 +02:00
Valerio Setti
2e0275d2a1 test: use unset-all option in config.py to optimize test code
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
a8c655edb0 test: remove redundant code setting MBEDTLS_PSA_CRYPTO_CONFIG
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
fe7d96cff7 test: minor optimizations to ecc_no_bignum components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
660bbf2470 test: disable BIGNUM support on the test ecc_no_bignum component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
06aebe4995 test: disable FFDH support on the test ecc_no_bignum component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
7dccb66d49 test: disable RSA support on the test ecc_no_bignum component
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
abd00d0be8 test: adding new components for testing and driver coverage analysis without BN
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Jerry Yu
76a51b99b6 replace strings command with grep
`strings | grep` will fail some time.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-09 15:56:26 +08:00
Jerry Yu
a7de78d050 improve test
- `grep '^flags' /proc/cpuino` does not work in my local machine inside script.
- `make test programs/sleftest ` causes `strings | grep ` fail.

For timebeing, I did not figure out the root cause.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-08 14:28:15 +08:00
Jerry Yu
7802f65a28 Add negative test for aesni only
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-07 10:38:50 +08:00
Jerry Yu
c935aa617b Add via padlock build test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-04 16:29:05 +08:00
Jerry Yu
193cbc03fe Add aesce build test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-04 09:38:37 +08:00
Jerry Yu
8a599c03fa Add aesni only test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 17:01:02 +08:00
Jerry Yu
17a9d2e412 Add MBEDTLS_AES_USE_HADWARE_ONLY for test_aesni
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:14:18 +08:00
Jerry Yu
1221a31cc4 Run aes tests only for test_aesni
That can reduce time of selftest

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:09:07 +08:00
Jerry Yu
69dd441eb5 Remove test_aes_*
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:00:20 +08:00
Gilles Peskine
267bee9be8
Merge pull request #7903 from valeriosetti/issue7773
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH
2023-08-02 10:16:44 +00:00
Jerry Yu
d76ded046c fix various issues
- unnecessary command
- extra blank and empty line

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
3660623e59 Rename plain c option and update comments
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
3fcf2b5053 Rename HAS_NO_PLAIN_C to DONT_USE_SOFTWARE_CRYPTO
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:00 +08:00
Jerry Yu
315fd30201 Rename plain c disable option
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
d767cc4106 Add accelerator only tests.
The cases with runtime detection have been
covered by `full` configuration

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:58 +08:00
Bence Szépkúti
9661f8ab0d
Merge pull request #7968 from gowthamsk-arm/use_earliest_latest_compilers
Use earliest latest compilers
2023-08-02 05:58:02 +00:00
Gowtham Suresh Kumar
9da40b8927 Update default variable values for compilers
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-31 23:11:18 +01:00
Janos Follath
2f04582d37 Move MBEDTLS_ECP_WITH_MPI_UINT to mbedtls_config.h
There is a precedent for having bigger and less mature options in
mbedtls_config.h (MBEDTLS_USE_PSA_CRYPTO) for an extended period.
Having this option in mbedtls_config.h is simpler and more robust.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:57:16 +01:00
Janos Follath
f3135af159 Use config.py in all new bignum tests
This previous test is correct, as it is using make. Switch to using
config.py for robustness and consistency.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:07:57 +01:00
Janos Follath
82823b2fe8 Fix new bignum tests
These tests weren't working, because they use CMake and can't pass
options with CFLAGS directly. This could be mitigated by adding a CMake
option, but using config.py is less invasive and it is what we normally
use for setting build options anyway.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:01:47 +01:00
Gowtham Suresh Kumar
6f1977bf20 Use variables for selecting compilers
The latest and earliest clang/GCC compilers are now used through
variables instead of symlinks and also the all.sh script is updated
to support options for overriding the default values.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 17:04:47 +01:00
Gowtham Suresh Kumar
1e829a403f Use compgen to gather components in all.sh
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:41:21 +01:00
Gowtham Suresh Kumar
8d45ec8b97 Remove test_clang_opt check
The component functions in all.sh will be listed using
compgen instead of sed so this check is not needed.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:36:25 +01:00
Valerio Setti
27602c32a2 test: accelerate all KEY_PAIR symbols in accel FFDH component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-27 09:15:34 +02:00
Gowtham Suresh Kumar
a12baf8c5f Update test scripts to use latest/earliest compilers
The Ubuntu 16.04 and 22.04 docker images have been updated with
earliest and latest versions of gcc and clang respectively.
This patch adds the necessary component and support functions
required for the CI to run these compilers.

For FreeBSD we invoke the function by name so a condition is added
to disable the existing test_clang_opt function for linux.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-26 16:51:45 +01:00
Gabor Mezei
e256cc1552
Add 32bit test component for ecp with new bignum interface
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-07-26 17:35:44 +02:00
Gilles Peskine
5647d06be8
Merge pull request #7518 from gilles-peskine-arm/psa_inject_entropy-file-stability
Fix and test MBEDTLS_PSA_INJECT_ENTROPY
2023-07-21 17:37:15 +02:00
Ronald Cron
87f62850f3
Merge pull request #7893 from ronald-cron-arm/misc-from-psa-crypto
Miscellaneous fixes resulting from the work on PSA-Crypto
2023-07-21 10:54:41 +02:00
Manuel Pégourié-Gonnard
c844c1a771
Merge pull request #7546 from mpg/align-psa-md-identifiers
Align psa md identifiers
2023-07-20 11:34:28 +02:00
Ronald Cron
7612d8c049 all.sh: Use consistently CONFIG_TEST_DRIVER_H
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:20:55 +02:00