30988 Commits

Author SHA1 Message Date
Tom Cosgrove
b7e5f31e2a Replace final sprintf() with snprintf() in psa_ff_server.c
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-28 14:31:48 +03:00
Ronald Cron
a7ec5c888c Update framework submodule to the merge of #15
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-27 17:48:53 +02:00
Valerio Setti
a37ea269a9 adjust_legacy_crypto: enable CIPHER_C when PSA CMAC is builtin
psa_crypto_mac.c uses mbedtls_cipher_xxx() functions to perform
CMAC operations. Therefore we need to enable CIPHER_C when
PSA CMAC is builtin.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-24 14:37:05 +02:00
Gilles Peskine
c7569a8c4b
Merge pull request #9159 from gilles-peskine-arm/analyze_outcomes-generate_files
Generate test data before coverage analysis
2024-05-23 12:08:15 +00:00
Gilles Peskine
39c5207d79 ssl-opt.sh, compat.sh: Error out if not executing any tests
Alert if all tests are filtered out or skipped: that probably indicates a
test script that set up an unintended configuration or an overly strict
filter. You can pass `--min 0` to bypass this check. You can pass `--min`
with a larger value to require that many test cases to run.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-23 13:38:26 +02:00
Ronald Cron
f5473a0260
Merge pull request #9057 from Ryan-Everett-arm/crypto-config-test_ref_configs
Update the reference configs to use `MBEDTLS_PSA_CRYPTO_CONFIG`
2024-05-23 05:58:55 +00:00
Gilles Peskine
2ad2f3207e Pacify pylint
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-22 09:35:11 +02:00
Gilles Peskine
78ae4f6fe1 Generate test data before coverage analysis
Fixes #8300.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-21 20:26:18 +02:00
Tom Cosgrove
df1bfec990
Merge pull request #9121 from valeriosetti/issue8963
Add client-server build to all.sh
2024-05-20 07:14:37 +00:00
Turiiya
27098b458b fix typo
Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
2024-05-18 18:08:12 +02:00
Thomas Daubney
a8004f27b7 Add additional CCM unset
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-17 14:48:47 +01:00
Thomas Daubney
8f83ba08e2 Change the way CBC is set
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-17 14:44:15 +01:00
Ronald Cron
b30cd3bb8f Improve test-ref-configs.pl
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:11 +02:00
Ronald Cron
ca6b1e9df3 Adjust crypto-config-thread.h
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:11 +02:00
Ronald Cron
b48c8704e6 Fix crypto_adjust_config_dependencies.h documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:11 +02:00
Ronald Cron
c4c8bdf32e Fix PBKDF2_AES_CMAC_PRF_128 dependencies
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:34:06 +02:00
Ronald Cron
97f0ea7611 Fix the resolution of dependencies on HMAC
The Mbed TLS implementations of ALG_TLS12_PRF,
ALG_TLS12_PSK_TO_MS, ALG_HKDF, ALG_HKDF_EXTRACT,
ALG_HKDF_EXPAND and ALG_PBKDF2 rely on HMAC
operations through the driver interface. Thus
if one of these algorithms is enabled and not
accelerated, we need ALG_HMAC to be enabled
(PSA_WANT_ALG_HMAC and PSA_WANT_KEY_TYPE_HMAC
defined). As HMAC operations occur through
the driver interface, HMAC operations can be
accelerated even if the caller algorithm
is not.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-17 14:33:44 +02:00
Valerio Setti
1f3c99c774 psa_autogen.py: improve management of output files
While at this, fix also Makefile so that "make clean" does not
complain if some of the files to be cancelled do not exist.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-16 16:13:38 +02:00
Ronald Cron
1f95ede98c Fix "maybe-uninitialized" warning with GCC 11.3
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
a33a824d8a Resolve PBKDF2_AES_CMAC_PRF_128 dependencies
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
b0c96f47e7 Resolve some HMAC dependencies automatically
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
b3a400b9bd config-suite-b: Enable EC with PSA_WANT
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
b16e1c2c2f Remove direct enablement of MBEDTLS_CIPHER/MD_C
Kept MD in thread config as needed for
HMAC_DRBG.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
4de85396cf Enable MBEDTLS_PSA_CRYPTO_C and MBEDTLS_USE_PSA_CRYPTO
Enable MBEDTLS_PSA_CRYPTO_C and MBEDTLS_USE_PSA_CRYPTO
is reference configurations as we are working towards
removing (always on) them.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
4dd6631aac test-ref-configs.pl: Detect automatically test with USE_PSA enabled
Change the way we decide if for a given
configuration we need to run tests with
and without MBEDTLS_USE_PSA_CRYPTO enabled.
That makes the script suitable for 3.6 and
development branch.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ronald Cron
640276268d Fix compat.sh filters
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
21eaa77ba8 Address ccm-psk-tls1_2 comments
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
0855b26a80 Address thread comments
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
2abd658030 Address symmetric-only comments
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
c3051572ca Address suite-b comments
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
44d7ddf82f In suite-b move definition of MBEDTLS_PSA_CRYPTO_CONFIG_FILE
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
4540cd3429 Add a crypto config file for suite-b
Also converts legacy symbols into their PSA equivalents.
When PSA is defined this does not change the compiled code

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
0a0393e8bd Use crypto config for ccm-psk-dtls1_2.h
Convert legacy symbols to their PSA equivalents.
This does not change code compiled when this config is active with PSA
enabled

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:03 +02:00
Ryan Everett
ab5ec9d3a4 Add a crypto config file for ccm-psk-tls1_2.h
Also convert legacy symbols to their PSA equivalents.
This does not change code compiled when this config is active with PSA
enabled

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:02 +02:00
Ryan Everett
d3b11571e2 Add a crypto-config file for symmetric-only
Replaces legacy symbols with the PSA equivalents.
This doesn't change the code generated when this config is active

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:02 +02:00
Ryan Everett
885ea8db8f Add a crypto config file for config-thread
This file consists of PSA symbols which are defined
if and only if the original config was set

Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-05-16 08:12:02 +02:00
Gilles Peskine
bdce65700e
Merge pull request #9067 from gilles-peskine-arm/ssl-opt-server2-detection
Fix skipped tests in configurations without RSA
2024-05-15 12:06:31 +00:00
Thomas Daubney
69ca57eadc Fix typo
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-14 16:29:23 +01:00
Thomas Daubney
b7c624ddd8 Remove _use_psa suffix from remaining components
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-14 16:11:00 +01:00
Thomas Daubney
5f2595a018 Remove non- _use_psa versions of components
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-14 16:09:34 +01:00
Manuel Pégourié-Gonnard
f5761ff26c
Merge pull request #9129 from valeriosetti/update-gitignore
Update gitignore for `test_keys.h`, `test_certs.h` and `.vscode`
2024-05-14 10:15:59 +00:00
Valerio Setti
87d99fbd6c psasim: create a seedfile to be used for the crypto server
This allows to re-enable MBEDTLS_ENTROPY_NV_SEED since the
seedfile is correctly found in the "test" folder at runtime.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-14 10:57:35 +02:00
Valerio Setti
dce6b85af8 psa_ff_client: fix typos and useless blank lines
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-14 10:43:14 +02:00
Valerio Setti
f57afd5acd all.sh: improvements
- add quotes to the $@ parameter in helper_crypto_client_build()
- instead of copying mbedtls_config.h to build static libraries,
  we rely on the already existing backup/cleanup mechanism which
  is available in all.sh.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-14 10:39:20 +02:00
Gilles Peskine
fc73aa02b0 Add missing dependency that isn't autodetected
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:18:41 +02:00
Gilles Peskine
f5a30afdae Remove redundant RSA dependency
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:18:28 +02:00
Gilles Peskine
d9c7be775e Explicitly use TLS 1.2 on <=1.2-specific keyUsage/extKeyusage tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:17:35 +02:00
Gilles Peskine
f9f3d21a67 Fix PSK invocation: GnuTLS PSK length (more)
Replace more sample PSK by longer (GnuTLS-compatible) strings, taking care
of keeping distinct PSK distinct for wrong-PSK tests.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-05-13 21:06:26 +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
6c0e362a82 Update framework submodule to tip of branch
This allows us to use the mbedtls_framework python files moved there.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:38 +01:00