mbedtls/programs/psa
Gilles Peskine 6d576c9646 Call setbuf when reading or writing files: programs
After opening a file containing sensitive data, call mbedtls_setbuf() to
disable buffering. This way, we don't expose sensitive data to a memory
disclosure vulnerability in a buffer outside our control.

This commit adds a call to mbedtls_setbuf() after each call to fopen(),
but only in sample programs that were calling mbedtls_platform_zeroize().
Don't bother protecting stdio buffers in programs where application buffers
weren't protected.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-06-30 17:06:11 +02:00
..
aead_demo.c Wrap long lines 2022-02-08 11:21:14 +01:00
CMakeLists.txt Move aead_non_psa out of the psa/ directory 2022-02-01 09:29:13 +01:00
crypto_examples.c Rename output buffer size macros 2021-01-21 13:17:25 +01:00
hmac_demo.c Update references to old Github organisation 2022-03-31 14:43:16 +01:00
key_ladder_demo.c Call setbuf when reading or writing files: programs 2022-06-30 17:06:11 +02:00
key_ladder_demo.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
psa_constant_names.c Remove duplicated definition of PSA_ALG_GET_HASH() 2021-05-04 10:25:05 +02:00