13 Commits

Author SHA1 Message Date
Gilles Peskine 0058f4c4cb psasim serialize: Support a few more standard C types
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-05 10:59:26 +01:00
Gilles Peskine 4f3a21f40d Stop using MBEDTLS_PRINTF_SIZET
Since Mbed TLS 3.6.0, all officially supported versions of Visual Studio
a printf function family that is sufficiently compliant to C99 for our
purposes, in particular supporting `%zu` for `size_t`. The only platform
without `%zu` that we semi-officially support is older versions of MinGW,
still used in our CI. MinGW provides either a Windows legacy printf or a
standards-compliant printf depending on the value of
`__USE_MINGW_ANSI_STDIO` when compiling each C file. Force the use of the
compliant version. Don't rely on `MBEDTLS_PRINTF_SIZET`, which is defined in
`<mbedtls/debug.h>` and no longer considers the Windows legacy version in
Mbed TLS >= 4.1.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-20 20:31:56 +01:00
Gilles Peskine 4857228971 psasim: add XOF operation support
XOF operations are not available on every branch, so their serialization
code needs to be compiled conditionally on the availability of the type.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-10 12:21:28 +01:00
Gilles Peskine a9bb80e699 Document the psasim build
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-09 15:34:29 +01:00
Gilles Peskine 2bc58125fe Add missing dependencies on generated headers
Without those dependencies, the headers don't get generated.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 22:23:52 +01:00
Gilles Peskine 3a69598ade Clean up psasim/.gitignore
Add generated files that are no longer checked in.

Remove obsolete things (including things now covered at the framework root).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 14:03:57 +01:00
Gilles Peskine b6c23e6e01 Remove psasim generated files
The files are now generated during the build. Stop having them in version
control.

As formerly in Mbed TLS, `make clean` doesn't remove
configuration-independent target-independent generated files, but the new
target `make neat` does.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 13:58:22 +01:00
Gilles Peskine 9dca598383 Add rules to generate wrappers during the psasim build
We don't need to check those generated files into version control.

This fixes the problem that the generated files have precise knowledge of
the functions that exist on whatever branch of TF-PSA-Crypto is consuming
the framework.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 13:58:22 +01:00
Gilles Peskine 4b0febffa1 psasim: Update generation script instructions for the TF-PSA-Crypto split
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 13:39:25 +01:00
Gilles Peskine 499dd4322e Update psasim generated files
TF-PSA-Crypto no longer has `psa_can_do_hash()` (except as a temporary stub
to avoid breaking the build of psasim).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-05 13:38:12 +01:00
Gilles Peskine c5c6dda693 Read include paths from the TF-PSA-Crypto makefile
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-27 18:25:25 +01:00
Minos Galanakis 7f6ad7c9b8 psasim: Update location in Makefile and all-core.sh
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-01-08 17:45:54 +00:00
Minos Galanakis d9823616cf Moved tests/psa-client-server to framework.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-01-08 17:15:35 +00:00