Ronald Cron
25ad10a920
tests: ssl: Improve tls13_srv_max_early_data_size()
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
19bfe0a631
tls13: Rename early_data_count to total_early_data_size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
70eab45ba6
tls13: generic: Fix log
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
dc81b7343f
tests: srv max early data size: Add reach_max test arg
...
Add the reach_max flag argument for the
test13_srv_max_early_data_size test
function. Non zero value only valid in case
of TEST_EARLY_DATA_ACCEPTED scenario.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
01d273d31f
Enforce maximum size of early data in case of HRR
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
919e596c05
Enforce maximum size of early data when rejected
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +01:00
Ronald Cron
2160bfe4e2
tests: ssl: Test enforcement of maximum early data size
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-01 09:29:16 +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
Dave Rodgman
79aaaa46e9
Fix formatting
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 18:41:36 +00:00
Valerio Setti
1a58e9a232
psa_util: change guard for mbedtls_psa_get_random() to CRYPTO_CLIENT
...
This commit also:
- updates changelog
- add a stub function to be used in component_test_psa_crypto_client()
test
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-29 16:14:29 +01:00
Dave Rodgman
87218b364d
blank line for readability
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 15:02:30 +00:00
Dave Rodgman
869e310456
Use export to set VERBOSE_LOGS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 15:02:27 +00: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
David Horstmann
c5688a2629
Merge branch 'development-restricted' into generate-random-buffer-protection
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 14:25:56 +00:00
Dave Rodgman
5f7862a567
Fix docs
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:14:37 +00:00
Dave Rodgman
a3e694c2ad
simplify printf call
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:49 +00:00
Dave Rodgman
63c94a36f1
improve docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:36 +00:00
Dave Rodgman
2096478034
Add editor hint for emacs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:19 +00:00
Dave Rodgman
1f08a3248e
Rename quiet to quiet.sh
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:04:59 +00:00
Minos Galanakis
b4ce628b64
tests: Added test for mbedtls_ecdh_context_grp
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-02-29 13:31:34 +00:00
David Horstmann
7581363122
Fix incorrect conflict resolution
...
A return statement was missing in the wrapper generation script.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 11:26:45 +00:00
tom-daubney-arm
840dfe8b41
Merge branch 'development-restricted' into asymmetric_encrypt_buffer_protection
...
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-02-28 15:42:38 +00:00
Gabor Mezei
f1dd0253ec
Remove write check in driver wrappers tests
...
This check is intended to ensure that we do not write intermediate
results to the shared output buffer. This check will be made obselete
by generic memory-poisoning-based testing for all functions.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-28 15:18:21 +00:00
Gabor Mezei
b74ac66c8b
Update test wrapper functions for ciper buffer protection
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-28 15:17:18 +00:00
Gabor Mezei
b8f97a1f3f
Add test wrapper functions for cipher buffer protection
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-28 15:17:17 +00:00
Gilles Peskine
c0f7a8680f
mbedtls_ecp_write_key(): deprecate the old function
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-28 13:19:42 +01:00
Gilles Peskine
84b9f1b039
mbedtls_ecp_write_key_ext(): migrate internally
...
Stop using mbedtls_ecp_write_key() except to test it.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-28 13:19:42 +01:00
Gilles Peskine
e3fb4ccabf
mbedtls_ecp_write_key_ext(): new function
...
Same as mbedtls_ecp_write_key(), but doesn't require the caller to figure out
the length of the output and possibly distinguish between Weierstrass and
Montgomery curves.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-28 13:19:42 +01:00
Manuel Pégourié-Gonnard
7f523bf9eb
Merge pull request #8845 from gilles-peskine-arm/ecp-write-doc-3.6
...
Document ECP write functions
2024-02-28 11:04:38 +00:00
Valerio Setti
b484e37d91
pk: fix alg selection in mbedtls_pk_sign_ext() for opaque keys
...
This commit also fixes pk_psa_wrap_sign_ext() setting the RSA padding
mode so that mbedtls_pk_get_psa_attributes() correctly guesses
the PSA alg to be used.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-28 09:44:35 +01:00
Gilles Peskine
2f107ae000
Don't access psa_key_attributes_t.core
...
Access the fields of `psa_key_attributes_t` directly rather than through the
`core` field. This makes the `core` field obsolete.
This commit is fully automated:
```
git ls-files '*.h' '*.c' '*.function' '*.jinja' | xargs perl -l -i -pe '$core = qr/\b(core\b|MBEDTLS_PRIVATE\(core\))/; s/->$core\./->/g; s/&(\w+)\.$core\./&$1./g; s/(\w+)\.$core/$1/g'
```
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-28 01:30:24 +01:00
Valerio Setti
23e637a7c7
test_suite_pk: initialize all PSA key IDs and attributes
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-27 13:56:57 +01:00
Valerio Setti
a9de9445b1
ssl_helpers: minor fix in mbedtls_test_ssl_endpoint_certificate_init()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-27 13:56:09 +01:00
Tom Cosgrove
ca21b241bd
Merge pull request #8840 from gilles-peskine-arm/domain_parameters-remove
...
Remove domain parameters
2024-02-27 10:36:51 +00:00
Valerio Setti
1fa2f6e9af
test: remove usage of mbedtls_pk_wrap_as_opaque() from tests
...
This is replaced with: mbedtls_pk_get_psa_attributes() +
mbedtls_pk_import_into_psa() + mbedtls_pk_setup_opaque().
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-27 09:23:35 +01:00
Dave Rodgman
08b81bf1e8
Test all unroll variations
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 18:43:22 +00:00
Dave Rodgman
2f94766a61
Send printed command to stderr
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:30:56 +00:00
Dave Rodgman
67126bbcea
remove trailing space from printed command
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:30:37 +00:00
Dave Rodgman
dbc2e8d4cc
Improve simplified quoting
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:29:31 +00:00
Dave Rodgman
bdf0a6d431
remove shebang from quiet
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:29:10 +00:00
Dave Rodgman
d0e3827ea2
Improve docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:28:56 +00:00
Dave Rodgman
c7f05490bb
Quote directory name from cmake wrapper
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:28:42 +00:00
Dave Rodgman
30483dccc0
Undo not-needed change
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:28:13 +00:00
Dave Rodgman
a9e8dbed14
Allow wrappers to be missing; quote directory name from make
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 17:27:18 +00:00
David Horstmann
075c5fb76f
Generate test wrappers for psa_generate_random()
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-26 17:12:34 +00:00
Thomas Daubney
4a46d73bb0
Suppress pylint
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-26 13:49:26 +00:00
Dave Rodgman
e03088b29e
Avoid infinite loop
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 12:48:49 +00:00
Dave Rodgman
98a79cdb23
Extract common parts of quiet wrapper
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 12:38:45 +00:00
Dave Rodgman
00bc790d79
Tidy up quiet wrappers
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 11:43:11 +00:00
Dave Rodgman
219006329d
Move quiet wrapper setup
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-26 11:41:19 +00:00