30972 Commits

Author SHA1 Message Date
Gilles Peskine
472c10f4a5 key_custom: update analyze_outcomes.py
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-06 13:13:05 +02:00
Gilles Peskine
f5db72bbb9 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-06 13:13:04 +02:00
Gilles Peskine
d865c42776 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-06 13:12:07 +02:00
Gilles Peskine
14134e7ddc 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-06 13:12:06 +02:00
Gilles Peskine
e65cca2ee5 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-06 13:12:06 +02:00
Gilles Peskine
603b5b842b 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-06 13:12:06 +02:00
Gilles Peskine
a8e39f2156 Update PSA wrappers
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-06 13:12:06 +02:00
Gilles Peskine
f36d785188 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-06 13:12:06 +02:00
Manuel Pégourié-Gonnard
095cf69bc6
Merge pull request #9444 from minosgalanakis/all-sh-separate-components_36bp
Backport 3.6:  Separate all.sh from its components
2024-08-06 07:58:03 +00:00
Minos Galanakis
bd6b98fd40 all.sh/components: Removed components.sh
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:20:26 +01:00
Minos Galanakis
bb427371e6 all.sh/components: Moved build_aes_via_padlock to platform component.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:20:26 +01:00
Minos Galanakis
5f6d2e3120 all.sh/components: Moved driver components to configuration crypto.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:20:26 +01:00
Minos Galanakis
0c0c3e1713 all.sh/components: Moved more components to configuration crypto.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:20:26 +01:00
Minos Galanakis
4ca7b14060 all.sh/components: Fixed a typo in configuration-tls.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:20:21 +01:00
Minos Galanakis
85347d15c6 all.sh/components: Moved more components to configuration tls.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:19:27 +01:00
Minos Galanakis
4a2a351df8 Extract sanitizer components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:02:39 +01:00
Minos Galanakis
f0cd95b6f6 Extract platform components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:02:39 +01:00
Minos Galanakis
93a8c08910 Extract configuration components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:02:37 +01:00
Minos Galanakis
27968c1660 Extract configuration-x509 components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:01:55 +01:00
Minos Galanakis
5b4386c640 Extract configuration-platform components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:01:53 +01:00
Minos Galanakis
3ece57e173 Extract configuration-crypto-components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-05 12:01:08 +01:00
Gilles Peskine
b49e884c87
Merge pull request #9309 from gilles-peskine-arm/psa-keystore-design-doc-3.6
Backport 3.6: Document the key store design
2024-08-02 07:16:19 +00:00
Minos Galanakis
b298d1f8d2 Extract compliance-components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
3bd6c30e13 Extract compiler-components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
2148e5c603 Extract build-components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
e431739c72 Extract basic-components into a separate file.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Minos Galanakis
f7d1cb0275 Separate all.sh from components.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-02 02:08:54 +01:00
Bence Szépkúti
52992e5c38
Merge pull request #9395 from sezrab/mbedtls_test_ssl_message_queue_pop_info-3.6
[Backport 3.6] tests/ssl_helpers: Check that message queue is popped
2024-08-01 18:38:31 +00:00
Minos Galanakis
f1f086e4a3 Applied consistent style.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:37:41 +01:00
Minos Galanakis
7771119069 Created placeholder component files.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-08-01 18:37:33 +01:00
Ronald Cron
d289fa1c98
Merge pull request #9432 from gabor-mezei-arm/9158_bp36_update_framework
[Backport 3.6] Adapt config.py to configuration file split
2024-08-01 12:51:34 +00:00
Gabor Mezei
fef3cc30f9
Update framework
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-08-01 12:07:11 +02:00
Gilles Peskine
fd01bec6b6 Miscellaneous clarifications
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 15:37:46 +02:00
Gilles Peskine
f13fdf8a80 Expand on performance
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 15:37:39 +02:00
Gilles Peskine
1a0107bf1b Discuss why we have so many variants
Explain that the hybrid key store is the historical implementation and
neither alternative is a drop-in replacement. Discuss how we could
potentially reduce the number of variants after the next major release.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 15:36:13 +02:00
Gilles Peskine
dbd726bb45 Link to issue about freeing empty slices
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 00:21:42 +02:00
Gilles Peskine
ac6b61077a Improve and fix explanation of next_free
In particular, fix an off-by-one error right after I explain how the number
is off by one from what you'd expect. State explicitly that the number can
be negative.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 00:12:46 +02:00
Gilles Peskine
7d8ababd0c Update macro name about the static key store
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 00:12:30 +02:00
Gilles Peskine
47f3fcd0f3 Typos and minor clarifications
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 00:12:21 +02:00
Ronald Cron
b38e960f24
Merge pull request #9419 from ronald-cron-arm/move-crypto-test-suites-3.6
[Backport 3.6] PR 9394 backport of fixes and framework submodule update
2024-07-24 09:24:18 +00:00
Ronald Cron
1640bd3154 Update auto-generated psa_test_wrappers.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 18:16:57 +02:00
Ronald Cron
e5bbb2f79f Update the framework submodule to the merge of PR38
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 18:15:03 +02:00
Ronald Cron
62b0976c68 Update framework as in PR 9394
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 07:53:12 +02:00
Ronald Cron
467775ef26 programs: fuzz: Fix comment
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 07:51:33 +02:00
Ronald Cron
c025f31399 tests: CMake: Align/fix config test suite generation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 07:51:10 +02:00
Ronald Cron
977766c59f CMake: Include CMakePrintHelpers
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 07:50:39 +02:00
Gilles Peskine
33218d2b30
Merge pull request #9329 from sezrab/replace_MBEDTLS_MD_CAN_MD5_with_PSA_WANT-3.6
Backport 3.6: Add MD5 support for requires_hash_alg
2024-07-18 09:41:05 +00:00
Gilles Peskine
7d3451df4f
Merge pull request #9388 from eleuzi01/backport-9285
[Backport 3.6] Fix typo in platform_util.c
2024-07-17 13:50:19 +00:00
Paul Elliott
ab26f5cdd4
Merge pull request #9386 from eleuzi01/backport-9287
[Backport 3.6] Fix some typo for include folder
2024-07-17 13:11:32 +00:00
Sam Berry
602550162c Add TLS: password protected... to ignored_tests list
Signed-off-by: Sam Berry <sam.berry@arm.com>
2024-07-17 10:03:40 +01:00