4595e6872d
Move print_buf into mbedtls_test_print_buf helper function in sample programs
...
Reduce code duplication and fix missing-prototype error for print_buf
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
2b87afbd1f
Add missing include in tests/src/asn1_helpers.c
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
a368c8a9af
Add -Wmissing-prototypes to component_build_no_ssl_srv and component_build_no_ssl_cli in all.sh
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2024-08-09 10:29:58 +01:00
6b4cd48d24
Replace MBEDTLS_ECP_HAVE_SECP384R1 with PSA_WANT_ECC_SECP_R1_384
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-09 09:49:03 +01:00
aacbc622a4
Merge pull request #9453 from gilles-peskine-arm/psa-keystore-dynamic-prep-4.0
...
Prepare for dynamic key store
2024-08-09 08:00:06 +00:00
e1171bd26f
Merge pull request #9361 from eleuzi01/replace-key-aria
...
Replace MBEDTLS_SSL_HAVE_ARIA with PSA_WANT_KEY_TYPE_ARIA
2024-08-08 15:41:01 +00:00
f35bb312c9
Merge pull request #9459 from gilles-peskine-arm/make-tests-make-3.81-20240808
...
Be compatible with GNU Make 3.81
2024-08-08 14:19:56 +00:00
fe8fc7515f
PSA_DONE: account for MBEDTLS_TEST_PSA_INTERNAL_KEYS
...
Replace the hard-coded 1 by the proper constant now that the proper constant
exists.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-08 15:58:31 +02:00
123a625386
Resolved merge conflicts caused by file moved in #8226
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com >
2024-08-08 14:11:53 +01:00
9e54a4f5ba
Merge pull request #9369 from eleuzi01/replace-ecc-keys
...
Replace MBEDTLS_PK_HAVE_ECC_KEYS with PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
2024-08-08 12:10:43 +00:00
88a6baaaaa
Be compatible with GNU Make 3.81
...
GNU Make 3.81 is officially not supported (we require >= 3.82), but be nice
to XCode users who are stuck with 3.81.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-08 14:07:24 +02:00
195e1647b2
Merge pull request #9427 from valeriosetti/psasim-small-fixes
...
psasim: small fixes to all.sh and test bash scripts
2024-08-07 13:13:46 +00:00
35f057330f
Keep track of PSA keys used interally
...
When PSA uses CTR_DRBG for its random generator and CTR_DRBG uses PSA for
AES, as currently implemented, there is one volatile key in permanent use
for the CTR_DRBG instance. Account for that in tests that want to know
exactly how many volatile keys are in use, or how many volatile keys can be
created.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-07 12:39:05 +02:00
0e3704f0a0
Reorder blocks to avoid double negations
...
Convert `#if !... A #else B #endif` to `#if ... B #else A`. No semantic change.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-07 12:39:05 +02:00
bdd16d4cb1
Make it possible to enable CTR_DRBG/PSA without a PSA AES driver
...
Make it possible, but not officially supported, to switch the CTR_DRBG
module to PSA mode even if MBEDTLS_AES_C is defined. This is not really
useful in practice, but is convenient to test the PSA mode without setting
up drivers.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-07 12:39:05 +02:00
51c85a0296
Replace MBEDTLS_SSL_HAVE_ARIA with PSA_WANT_KEY_TYPE_ARIA
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-07 11:33:14 +01:00
821b908456
Merge pull request #9364 from eleuzi01/replace-ccm
...
Replace MBEDTLS_SSL_HAVE_CCM with PSA_WANT_ALG_CCM
2024-08-07 08:18:52 +00:00
2d5b17be03
Merge pull request #8609 from tom-daubney-arm/standardise_proj_detection
...
Standardise Project Detection in Shell Scripts
2024-08-07 07:18:36 +00:00
b55679736b
Move some proj detection code inside pre_check_environment
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-08-06 17:35:38 +01:00
7c0b4adfa2
Remove MBEDTLS_AES_DECRYPT_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-08-06 15:20:03 +01:00
6cf05f9322
Remove MBEDTLS_AES_ENCRYPT_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-08-06 15:15:51 +01:00
955ce58142
Remove MBEDTLS_AES_SETKEY_DEC_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-08-06 15:15:08 +01:00
742a2e3619
Remove MBEDTLS_AES_SETKEY_ENC_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2024-08-06 15:09:16 +01:00
2016d66741
psasim: small fixes to all.sh and test bash scripts
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-08-06 11:52:00 +02:00
3e81411122
Remove test_valgrind_constant_flow_psa_no_asm
...
+ typo fix
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:55:44 +01:00
65d102673c
Remove the hack in library/constant_time_impl.h
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:54:58 +01:00
61dabbd77b
Edit component_release_test_valgrind_constant_flow_no_asm
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:53:42 +01:00
aff61f35f7
Change valgrind constant flow testing to test without asm
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:52:38 +01:00
dcb5d83d66
Disable asm in component_test_memsan
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:50:57 +01:00
969e9e1af0
Alter constant-flow memsan testing
...
Disable asm in memsan constant-flow testing and add a check in
check_config.h
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:48:19 +01:00
8dde3b3dec
Replace MBEDTLS_PK_HAVE_ECC_KEYS with PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:41:58 +01:00
c256172b30
Replace MBEDTLS_SSL_HAVE_CCM with PSA_WANT_ALG_CCM
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:40:00 +01:00
59aea4e1cc
armv8 AES, SHA: simplify structure and fix copypasta
...
Reorganize the structure of the builds of aesce.c and sha256ce.c with
various configurations of AES/SHA256 acceleration. Now everything in a given
configuration is grouped together (building the object file, and checking
the presence or absence of certain instructions in the assembly).
Fix several instances of copypasta in -m options where we were sometimes not
allowing the compiler to use optional instructions even though we use them
in inline assembly, and sometimes allowing the compiler to use optional
instructions even though we then checked their absence
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 16:11:34 +02:00
8bea95de00
Use .s extension for assembly
...
Having assembly files called *.o was confusing.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 16:10:57 +02:00
20de806b8d
Use -O2 for build+test with earliest compilers
...
The compilation is slower but we get more potential warnings and running the
tests is faster.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 16:07:15 +02:00
29e86ca059
Fix spurious * in regex
...
`grep mbedtls_des*` would pick up e.g. mbedtls_derive_xxx.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 16:05:31 +02:00
d860f28b29
Don't set LD to a path with a typo for mingw
...
Our makefiles don't use $(LD) so the typo was harmless.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 16:03:20 +02:00
7db1bcdb34
Update generated PSA wrappers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 15:52:37 +02:00
fd46f7f173
Migrate psasim wrappers to psa_custom_key_parameters_t
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 15:52:37 +02:00
1084e8eb4f
key_custom: update analyze_outcomes.py
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 15:52:37 +02:00
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
b45af2f507
Update PSA wrappers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-05 15:49:22 +02:00
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
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
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
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
4b3b4fe56e
Remove cruft and update documentation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-08-02 12:42:01 +02:00
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
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
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