1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-04-23 10:25:35 +03:00

22 Commits

Author SHA1 Message Date
tom-daubney-arm
24d60ad716
Merge branch 'mbedtls-2.28-restricted' into backport_asymmetric_encrypt_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-02-28 15:43:48 +00:00
Thomas Daubney
be060f1e85 Suppress pylint
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-26 13:55:42 +00:00
tom-daubney-arm
8eafe1525d
Merge branch 'mbedtls-2.28-restricted' into backport_mac_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-02-22 15:28:49 +00:00
David Horstmann
0ce9589e36
Merge pull request #1133 from davidhorstmann-arm/copying-aead-2.28
[Backport 2.28] Copy buffers in AEAD
2024-02-20 16:07:36 +00:00
David Horstmann
a9cc4cd1cb
Merge pull request #1179 from Ryan-Everett-arm/key-derivation-buffer-protection-backport
[Backport] Add buffer copying to the Key Derivation API
2024-02-15 11:54:28 +00:00
Thomas Daubney
2b614f9dad Generate all test wrappers
One was missed due to typo

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-12 13:07:48 +00:00
Thomas Daubney
d8adccf45d Generate test wrappers
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-12 13:07:43 +00:00
Thomas Daubney
6b91503602 Generate test wrappers for MAC functions
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-12 12:21:43 +00:00
Thomas Daubney
ebf9329d88 Generate test wrappers for hash functions
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-12 11:51:38 +00:00
Ryan Everett
6c9e69d53b Add key derivation testing wrappers
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-09 16:23:25 +00:00
Ryan Everett
c8b6c05014 Update tests/scripts/generate_psa_wrappers.py
Co-authored-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:50:51 +00:00
Ryan Everett
cb4f855456 Fix line-too-long in script
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:50:51 +00:00
Ryan Everett
810421ccc6 Re-add cipher_encrypt buffer copying
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:50:51 +00:00
Ryan Everett
dcbc1d3750 Generate test wrappers for key management
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-02-02 10:50:51 +00:00
Thomas Daubney
c63e31af8b Generate test wrappers
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-01-30 13:33:14 +00:00
David Horstmann
436b2ef633 Generate poisoning wrappers for AEAD
Modify wrapper generation script to generate poisoning calls and
regenerate wrappers.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-01-24 14:58:05 +00:00
Gilles Peskine
a980aa0894 Disable PSA wrappers psa_collect_statuses builds
`psa_collect_statuses.py` runs `make RECORD_PSA_STATUS_COVERAGE_LOG=1`,
which builds with `RECORD_PSA_STATUS_COVERAGE_LOG`. In this mode, the build
includes wrappers for PSA functions, which conflict with the newly
introduced wrappers that are enabled whenever `MBEDTLS_TEST_HOOKS` is
enabled. In the future, the collect-statuses mechanism should use the new
generic wrapper mechanism. For the time being, keep the old wrappers and
avoid the new wrappers when doing the collect-statuses build.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 21:07:35 +01:00
Gilles Peskine
b3d457ce2f PSA wrappers: don't poison buffers when buffer copying is disabled
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 20:33:29 +01:00
Gilles Peskine
7c7b7d5db3 Add review exception warning
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 17:28:59 +01:00
Gilles Peskine
c8b22d0713 Generated PSA wrappers: poison/unpoison buffer parameters
For now, only instrument the one function for which buffer copying has been
implemented, namely `psa_cipher_encrypt`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 16:58:23 +01:00
Gilles Peskine
17a14f1711 Adapt wrapper generators from 3.5 to 2.28
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 16:41:30 +01:00
Gilles Peskine
8519dc9c7e PSA wrapper generator
The new script `tests/scripts/generate_psa_wrappers.py` generates the
implementation of wrapper functions for PSA API functions, as well as a
header that defines macros that redirect calls to the wrapper functions. By
default, the wrapper functions just call the underlying library function.
With `--log`, the wrapper functions log the arguments and return values.

This commit only introduces the new script. Subsequent commits will
integrate the wrappers in the build.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-01-04 16:38:17 +01:00