Manuel Pégourié-Gonnard
49645f6490
Misc improvements to comments
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:45 +02:00
Manuel Pégourié-Gonnard
3106013e17
Fix code style (for real this time, hopefully)
...
For some reason I didn't think about other files in the previous commit.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:44 +02:00
Janos Follath
21445c580f
Prepare codepath tests for early termination
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-09-05 10:47:42 +02:00
Janos Follath
514e62c833
Move bignum code path testing out of the library
...
Without this, it's not at all obvious that turning on MBEDTLS_TEST_HOOKS
doesn't change the functional behavior of the code.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-09-05 10:47:40 +02:00
Waleed Elmelegy
bdf2c98a27
Add psa_key_agreement() API
...
Add psa_key_agreement() API and basic testing.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-16 14:36:47 +01:00
Paul Elliott
2dc5fa3a19
Add generated files for new iop key generation funcs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-15 13:51:05 +01:00
Janos Follath
1176e6f90e
Merge pull request #9410 from paul-elliott-arm/add_docs_iop_key_agreement
...
Add IOP Key agreement Documentation
2024-08-13 13:25:22 +00:00
Bence Szépkúti
88f3dd9f78
Merge pull request #9402 from tom-daubney-arm/remove_function_level_alt_interface
...
Remove function level alt interface
2024-08-09 17:59:51 +00:00
Gilles Peskine
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
Gilles Peskine
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
Gilles Peskine
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
Gilles Peskine
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
Manuel Pégourié-Gonnard
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
Thomas Daubney
742a2e3619
Remove MBEDTLS_AES_SETKEY_ENC_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-06 15:09:16 +01:00
Elena Uziunaite
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
Gilles Peskine
7db1bcdb34
Update generated PSA wrappers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +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
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
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
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
Elena Uziunaite
5c70c30655
Replace MBEDTLS_SSL_HAVE_CHACHAPOLY with PSA_WANT_ALG_CHACHA20_POLY1305
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-31 16:31:00 +01:00
Elena Uziunaite
74342c7c2b
Replace MBEDTLS_SSL_HAVE_CBC with PSA_WANT_ALG_CBC_NO_PADDING
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-31 16:19:15 +01:00
Elena Uziunaite
6121a344dd
Replace MBEDTLS_SSL_HAVE_AES with PSA_WANT_KEY_TYPE_AES
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-30 18:42:19 +01:00
Ronald Cron
b16b8c2c0c
Updated auto-generated psa_test_wrappers.
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-23 18:19:57 +02:00
Paul Elliott
c884b29b95
Add generated files for new iop key agreement funcs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 18:28:11 +01:00
Thomas Daubney
356309f462
Restore config option
...
Restore previously removed option but with a more
relevant name.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:55 +01:00
Thomas Daubney
ebeef1508a
Remove MBEDTLS_TEST_HAVE_ALT_GCM
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:55 +01:00
Thomas Daubney
c7cb810c22
Remove MBEDTLS_GCM_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:15:07 +01:00
Thomas Daubney
4137609776
Remove MBEDTLS_AES_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-07-12 16:13:37 +01:00
Elena Uziunaite
0916cd702f
Replace MBEDTLS_MD_CAN_SHA256 with PSA_WANT_ALG_SHA_256
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-11 11:13:35 +03:00
Elena Uziunaite
b476d4bf21
Replace MBEDTLS_MD_CAN_SHA384 with PSA_WANT_ALG_SHA_384
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-03 10:20:41 +01:00
Valerio Setti
8473390bbb
tests: fix guards in test suites to allow testing with PSASIM
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 15:45:55 +02:00
Ronald Cron
7062d3d936
tests: src: Fix PSA test wrappers for PAKE
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-19 09:24:28 +02:00
Manuel Pégourié-Gonnard
70cd911405
Improve comment in a header file
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:01 +02:00
Pengyu Lv
ebdca796a1
Fix failures in psa_cryto_driver_wrappers suite
...
- "in-driver" test should depend on the present
of a driver.
- add new counter in key manangement driver test
hook which counts the calls of generate_key.
- We only care about the hits when processing
`psa_generate_key`.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2024-04-09 10:48:24 +02:00
Minos Galanakis
b70f0fd9a9
Merge branch 'development' into 'development-restricted'
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-19 22:24:40 +00:00
Waleed Elmelegy
4dfb0e7c90
Add ALPN checking when accepting early data
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-03-15 12:12:15 +00:00
Ryan Everett
e1b50f38e4
Document unsupported concurrency scenario in psa_exercise_key
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-03-14 17:51:09 +00:00
Ryan Everett
73e4ea37f4
Add key_destroyable parameter to non-raw key agreement smoke tests
...
All current usages have this parameter set to 0 (this means the tests are unchanged).
Remove the GENERIC_ERROR return behaviour, in favour of returning the actual status.
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-03-13 14:31:11 +00:00
David Horstmann
80a5dbd1cd
Regenerate PSA wrappers for new PSA functions
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-12 17:02:48 +00:00
Ryan Everett
8163028fbd
Add key_destroyable parameter to raw key agreement smoke tests
...
All current usages have this parameter set to 0 (meaning the behaviour
of these tests hasn't changed). We also now return the actual error code, not GENERIC_ERROR
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-03-12 17:01:09 +00:00
Ryan Everett
c1cc6686f0
Add key_destroyable parameter to key derivation smoke tests
...
All current usages have this parameter set to 0 (in this case the behaviour of
the test is unchanged)
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-03-12 17:01:09 +00:00
Ryan Everett
0a271fde76
Add key_destroyable parameter to mbedtls_test_psa_exercise_key
...
This will allow us to use this smoke test to ensure that key slot content reads are
only performed when we are registered to read a full slot. We will destroy the key
on another thread while the key is being exercised, and fail the test if an unexpected
error code is hit. Future commits will incrementally implement this new parameter.
All current usages of this function have this parameter set to 0, in which case
the new behaviour must be the same as the old behaviour
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-03-12 17:01:09 +00:00
David Horstmann
93fa4e1b87
Merge branch 'development' into buffer-sharing-merge
2024-03-12 15:05:06 +00:00
Ronald Cron
7e1f9f290f
Merge pull request #8854 from ronald-cron-arm/tls13-srv-max-early-data-size
...
TLS 1.3: Enforce max_early_data_size on server
2024-03-09 00:16:07 +00:00
Ronald Cron
139a4185b1
Merge pull request #8587 from yanrayw/issue/4911/ssl_setup-check-RNG-configuration
...
TLS: check RNG when calling mbedtls_ssl_setup()
2024-03-08 07:38:39 +00:00
Paul Elliott
053b7886e5
Ensure drivers have threading enabled if required
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-03-05 14:27:23 +00:00
Ronald Cron
10b040fa6f
tests: ssl_helpers: Rename rng_get to mbedtls_test_random
...
mbedtls_test_ as the prefix for test APIs
_random like in mbedtls_ctr/hmac_drbg_random
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 17:00:38 +01:00
Ronald Cron
5d3036e6d5
tests: ssl: Add max_early_data_size option
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:03:51 +01:00
Ronald Cron
9b4e964c2c
Merge pull request #8760 from ronald-cron-arm/tls13-write-early-data
...
TLS 1.3: Add mbedtls_ssl_write_early_data() API
2024-02-29 14:31:55 +00:00