Commit graph

26898 commits

Author SHA1 Message Date
Gilles Peskine
7b2b76a2d4
Merge pull request #7165 from yanrayw/7094-collect-compatsh-test-cases
check_test_cases.py: support to collect test cases for compat.sh
2023-08-31 07:30:20 +00:00
Tom Cosgrove
5a387c8515
Merge pull request #8140 from daverodgman/sha3-zeroize
Ensure mbedtls_sha3_finish zeroizes the context
2023-08-31 07:16:35 +00:00
Dave Rodgman
984309c2c3 Call mbedtls_platform_zeroize via mbedtls_sha3_free
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-30 19:22:28 +01:00
Dave Rodgman
dbddb00158 Ensure mbedtls_sha3_finish zeroizes the context
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-30 18:43:23 +01:00
Paul Elliott
240240dfae Regenerate coverity scan token
On the advice of travis support, try regenerating the coverity scan
token to see if that fixes the connection to coverity scan

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-08-30 18:06:50 +01:00
David Horstmann
22ec2aefa9 Fix unnecessary header prefixes in tests
Remove unnecessary "../library" prefix from test suite includes. This
makes the tests repo-agnostic between the mbedtls and psa-crypto repos.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-30 15:34:34 +01:00
Yanray Wang
63f0abe226 check_test_cases: add a comment to explain idx in walk_compat_sh
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-08-30 18:31:37 +08:00
Dave Rodgman
29bf911058
Merge pull request #7839 from daverodgman/psa-sha3
SHA-3 via PSA
2023-08-30 08:51:36 +00:00
David Horstmann
8f3ec8ec9d Use '--target' instead of shortened '-t'
This enables compatibility with older versions of CMake that do not have
the abbreviated switch.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-30 09:46:20 +01:00
Yanray Wang
ab717b5287 Merge remote-tracking branch 'origin/development' into 7094-collect-compatsh-test-cases 2023-08-30 10:38:28 +08:00
David Horstmann
3ed1871920 Disable pylint error for non-uppercase names
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 18:20:19 +01:00
Dave Rodgman
33e1f42307 Fix use of mbedtls_psa_safer_memcmp in test code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 18:17:29 +01:00
David Horstmann
9cc6b2f446 Add missing import in test_psa_compliance.py
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 17:36:35 +01:00
David Horstmann
fd9264e65b Fix pylint errors
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 16:21:15 +01:00
Gilles Peskine
f3a41685e7
Merge pull request #8126 from daverodgman/p256-m-aarch64
Disable p256-m asm on aarch64
2023-08-29 14:15:08 +00:00
Gilles Peskine
a878b663cf
Merge pull request #8090 from silabs-Kusumit/PBKDF2_higher_cost_tests
PBKDF2: tests with higher input costs
2023-08-29 14:00:17 +00:00
David Horstmann
41c316d3b2 Move -B switch into a single argument
This will prevent CMake from mistaking the build directory for the
source directory

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:57:23 +01:00
Dave Rodgman
787011542b Fully replace mbedtls_psa_safer_memcmp
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 14:20:18 +01:00
David Horstmann
b48822c816 Appease pylint by renaming variables
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:12:53 +01:00
David Horstmann
beaee2604f Test PSA compliance: Build only the crypto target
Use CMake's -t option to build only the crypto target. Parameterize the
crypto target to have the right name depending on whether this is Mbed
TLS or PSA Crypto.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:01:52 +01:00
David Horstmann
c69074dcf6 Tidy up reference to Mbed TLS in help message
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 13:46:11 +01:00
Dave Rodgman
024a3b3f04 Disable p256-m asm on aarch64
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 13:21:43 +01:00
David Horstmann
2ba89bece6 Disable pylint error in CMake command
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:37:29 +01:00
David Horstmann
3b8984af5c Remove or qualify references to Mbed TLS
Either remove exclusive references to Mbed TLS or accompany them with
references to "PSA Crypto".

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:32:26 +01:00
David Horstmann
f757069269 Rename 'mbedtls_dir' -> 'root_dir'
This makes it more repo-agnostic

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:27:13 +01:00
David Horstmann
98af198a30 Correctly detect presence of the built library
Use the repo-specific test not just the Mbed TLS specific one.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:25:54 +01:00
David Horstmann
58cf7c6c38 Use repo detection functions at start of all.sh
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:15:05 +01:00
David Horstmann
d02b5f8f56 Separate directory discernment into 2 functions
Have separate in_mbedtls_repo() and in_psa_crypto_repo() functions

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 09:55:56 +01:00
David Horstmann
2fde99962d Improve directory coverage in PSA repo detection
Check for the 'drivers' and 'programs' directories additionally to the
ones that are already there.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 09:50:16 +01:00
Dave Rodgman
d395590597
Merge pull request #7579 from daverodgman/safer-ct-asm
Arm assembly implementation of constant time primitives
2023-08-28 08:26:29 +00:00
Gilles Peskine
8ca2041145
Merge pull request #8074 from tgonzalezorlandoarm/tg/allowlist
Implement allowlist of test cases that are legitimately not executed
2023-08-24 18:03:20 +00:00
Gilles Peskine
2a296729d0
Merge pull request #8084 from AgathiyanB/remove-type-qualifier-in-assignment-casts
Remove type qualifier in assignment casts
2023-08-24 18:02:11 +00:00
David Horstmann
0ac57ca6c6 Rename is_psa_crypto -> in_psa_crypto_repo
(For consistency with all.sh)

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
7f93d22ad9 Rename psa_crypto_lib_filename to just crypto_lib_filename
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
4dcddcfae2 Parameterize out of source build directory
Use CMake to build the library out-of-source (rather than make)
in tests/scripts/test_psa_compliance.py and add a script argument for
the out-of-source build directory.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
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
e31014a681 Tweak test_psa_compliance pylint annotations
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
42f42f4394 Support psa-crypto repo in psa_storage.py
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
1d09184291 Modify test_psa_compliance.py for psa-crypto repo
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
795d8b523d Modify build_tree.py for the PSA Crypto repo
When detecting the root dir, look both for PSA Crypto and Mbed TLS
directories.

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
Tomás González
d43cab3f5c Correct analyze_outcomes identation
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-24 09:12:40 +01:00
Gilles Peskine
ef483255db Announce that #7420 is fixed
This is part of a bigger issue https://github.com/Mbed-TLS/mbedtls/issues/7609
which is still pending since there are still configurations that are not
handled correctly. However https://github.com/Mbed-TLS/mbedtls/issues/7420
itself was fixed by https://github.com/Mbed-TLS/mbedtls/pull/7611.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-23 18:08:45 +02:00
Tom Cosgrove
41d689f389
Merge pull request #7985 from tom-cosgrove-arm/single-source-of-truth-for-licensing
Single source of truth for licensing
2023-08-22 16:27:21 +00:00
Agathiyan Bragadeesh
1515f351a1 Remove IAR warning fixes to 2.28 from changelog
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-08-22 15:24:38 +01:00
Agathiyan Bragadeesh
c5eb13d2a9 Reword IAR changelog for fixing compiler warnings
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-08-22 15:13:04 +01:00
Tom Cosgrove
3d2d599d3e
Merge pull request #7996 from gilles-peskine-arm/small_primes-gaps
Reduce the size of the small primes table used by primality testing
2023-08-22 12:48:56 +00:00
Gilles Peskine
e65bba4dd2
Merge pull request #7803 from gilles-peskine-arm/psa-low-hash-mac-size
Start testing the PSA built-in drivers: hashes
2023-08-22 11:19:41 +00:00
Tomás González
a0631446b5 Correct analyze_outcomes.py identation
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 12:18:04 +01:00
Gilles Peskine
30b0378008 Fix off-by-one error
The value of p after adding the last entry in the gap table is not used.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 11:06:47 +02:00