Gilles Peskine
3077f2f9c6
Remove experimental, superseded function psa_generate_key_ext
...
Remove the experimental functions psa_generate_key_ext() and
psa_key_derivation_output_key_ext(), which require a flexible array member
and therefore break C++ code that includes Mbed TLS headers. They have been
replaced by psa_generate_key_custom() and
psa_key_derivation_output_key_custom().
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
6b3bca5c78
Follow include path updates for C++ builds
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
d5d69bb4a0
Match spacing in pointer types in documentation with the code style
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
63d06efc38
Rename one more deprecated identifier
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
6b2709bf06
Documentation improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
ae8fa71669
Rename internal function psa_key_production_parameters_are_default
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
1084e8eb4f
key_custom: update analyze_outcomes.py
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
62ee8fdcf5
Test cpp_dummy_build in pedantic mode
...
In public headers, we want to avoid things that are not standard C++,
including features that GCC and Clang support as extensions, such as
flexible array members. So compile with `-pedantic`.
Non-regression for https://github.com/Mbed-TLS/mbedtls/issues/9020 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:32 +02:00
Gilles Peskine
b0cc2ad6bd
Changelog entry for the move from key_ext to key_custom functions
...
Document psa_generate_key_ext() and psa_key_derivation_output_key_ext() as
deprecated in favor of psa_generate_key_custom() and
psa_key_derivation_output_key_custom(), and no longer declared in C++ builds.
Resolves #9020 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
ae1da9858c
Remove some tests of psa_generate_key_ext
...
We know it's a thin wrapper around psa_generate_key_custom, so we just need
to check that it's passing the information through, we don't need coverage
of the parameter interpretation.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
8ae5028a1d
Document the key_ext functions as deprecated
...
Don't formally deprecate them because we don't do that in a
long-time support branch. But do point readers away from them.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
e863f868ec
Documentation: point to key_custom instead of key_ext
...
Replace references to the deprecated functions `psa_generate_key_ext()` and
`psa_key_derivation_output_key_ext()` by their replacements
Implement `psa_generate_key_custom()` and
`psa_key_derivation_output_key_custom()`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
b45af2f507
Update PSA wrappers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
f9408282e8
Implement psa_generate_key_custom
...
Implement `psa_generate_key_custom()` and
`psa_key_derivation_output_key_custom()`. These functions replace
`psa_generate_key_ext()` and `psa_key_derivation_output_key_ext()`.
They have the same functionality, but a slightly different interface:
the `ext` functions use a structure with a flexible array member to pass
variable-length data, while the `custom` functions use a separate parameter.
Keep the `ext` functions for backward compatibility with Mbed TLS 3.6.0.
But make them a thin wrapper around the new `custom` functions.
Duplicate the test code and data. The test cases have to be duplicated
anyway, and the test functions are individually more readable this way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
be6a47140b
Merge pull request #9365 from eleuzi01/replace-gcm
...
Replace MBEDTLS_SSL_HAVE_GCM with PSA_WANT_ALG_GCM
2024-08-05 09:43:23 +00:00
Manuel Pégourié-Gonnard
aa6f6d25e2
Merge pull request #8226 from davidhorstmann-arm/all-sh-separate-components
...
Separate `all.sh` from its components
2024-08-05 08:38:23 +00:00
Gilles Peskine
9c9a3df3bf
Merge pull request #9366 from eleuzi01/replace-chachapoly
...
Replace MBEDTLS_SSL_HAVE_CHACHAPOLY with PSA_WANT_ALG_CHACHA20_POLY1305
2024-08-02 14:26:27 +00:00
Tom Cosgrove
5b85d709c3
Merge pull request #9442 from gilles-peskine-arm/psa_sim_generate-parse_headers
...
psa_sim_generate.pl: don't copy the headers
2024-08-02 13:47:27 +00:00
Gilles Peskine
4b3b4fe56e
Remove cruft and update documentation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-02 12:42:01 +02:00
Elena Uziunaite
83a0d9deec
Replace MBEDTLS_SSL_HAVE_GCM with PSA_WANT_ALG_GCM
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-08-02 09:52:20 +01:00
Gilles Peskine
56b4e5a65d
Merge pull request #9443 from gilles-peskine-arm/psa-keystore-design-doc-development
...
Document the key store design
2024-08-02 07:16:13 +00:00
Minos Galanakis
bf47cf7437
all.sh/components: Moved component_build_zeroize_checks -> compiler.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
9ceb2c3e0a
all.sh/components: Moved test_malloc_0_null,test_memory_buffer_allocator -> configuration.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
aa09e48854
all.sh/components: Moved test_sw_inet_pton -> x509.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
c06fd308c2
all.sh/components: Moved crypto components out of tls.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
1c26ef555c
all.sh/components: Moved component_test_no_strings -> configuration.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
b5891d5dec
all.sh/components: Moved aesni and armce components -> platform.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
1ef3a66540
all.sh/components: Moved test_aesni_m32_clang -> platform.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
07404d27ef
all.sh/components: Moved build_arm_xxx from compiler -> platform.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
f699d51a0b
all.sh/components: Moved support functions to the same group as their components.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
4b6ee64541
all.sh/components: Moved test_depends_py_kex/psa to tls.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Minos Galanakis
ce466f019a
all.sh: Updated the component sourcing logic.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:47 +01:00
Bence Szépkúti
ea7fff481e
Merge pull request #8775 from tgonzalezorlandoarm/tg/mbedtls_test_ssl_message_queue_pop_info
...
tests/ssl_helpers: Check that message queue is popped
2024-08-01 18:38:35 +00:00
Minos Galanakis
609f749c56
all.sh/components: Removed duplicated/obsolete documentation/whitespace.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:38:27 +01:00
Minos Galanakis
f78447f22e
test/scripts/components: Applied consistent style.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
dc0f73a5e2
components-configuration-crypto:Added component_test_no_rsa_key_pair_generation.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
cd5668f6a6
components-configuration-crypto: Added component_test_full_no_cipher.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
96bf1822bf
Extract psasim components into a separate file.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
e280ff8936
Extract sanitizer components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
8a98090edf
Extract platform components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:58 +01:00
Minos Galanakis
31b7a0c799
Extract configuration components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 19:08:52 +01:00
Minos Galanakis
09b179b67c
Extract configuration-x509 components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
7665a93799
Extract configuration-tls components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
f6e1adce08
Extract configuration-platform components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
471b34cc42
Extract configuration-crypto-components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
328b9e8bca
Extract compliance-components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
9ebb88244b
Extract compiler-components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
5357defbf3
Extract build-components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
85c78f5559
Extract basic-components into a separate file.
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00
Minos Galanakis
db7b1bb52b
Adjusted style for psasim components
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:44:47 +01:00