Merge pull request #9992 from Harry-Ramsey/move-zeroize-memset-configuration

Move zeroize memset configuration
This commit is contained in:
Ronald Cron 2025-02-19 10:11:05 +00:00 committed by GitHub
commit 7ef0c60260
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 19 deletions

View File

@ -1,17 +0,0 @@
/* crypto_config.h modifier that defines mbedtls_platform_zeroize() to be
* memset(), so that the compile can check arguments for us.
* Used for testing.
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#include <string.h>
/* Define _ALT so we don't get the built-in implementation. The test code will
* also need to define MBEDTLS_TEST_DEFINES_ZEROIZE so we don't get the
* declaration. */
#define MBEDTLS_PLATFORM_ZEROIZE_ALT
#define mbedtls_platform_zeroize(buf, len) memset(buf, 0, len)

View File

@ -114,7 +114,7 @@ component_build_zeroize_checks () {
scripts/config.py full
# Only compile - we're looking for sizeof-pointer-memaccess warnings
make CFLAGS="'-DTF_PSA_CRYPTO_USER_CONFIG_FILE=\"../tests/configs/user-config-zeroize-memset.h\"' -DMBEDTLS_TEST_DEFINES_ZEROIZE -Werror -Wsizeof-pointer-memaccess"
make CFLAGS="'-DTF_PSA_CRYPTO_USER_CONFIG_FILE=\"$TF_PSA_CRYPTO_ROOT_DIR/tests/configs/user-config-zeroize-memset.h\"' -DMBEDTLS_TEST_DEFINES_ZEROIZE -Werror -Wsizeof-pointer-memaccess"
}
component_test_zeroize () {

@ -1 +1 @@
Subproject commit 67995d5def986d60fc81d85f5b3965e8f660e2e9
Subproject commit da76c6b1915c75e9dd9efc32f7d206a05b5d36c8