diff --git a/3rdparty/p256-m/p256-m/p256-m.c b/3rdparty/p256-m/p256-m/p256-m.c index 21a021bad660..693cc6da2c68 100644 --- a/3rdparty/p256-m/p256-m/p256-m.c +++ b/3rdparty/p256-m/p256-m/p256-m.c @@ -7,6 +7,7 @@ */ #include "p256-m.h" +#include "mbedtls/platform_util.h" #include "psa/crypto.h" #include #include @@ -17,12 +18,7 @@ /* * Zeroize memory - this should not be optimized away */ -static void zeroize(void *d, size_t n) -{ - volatile char *p = d; - while( n-- ) - *p++ = 0; -} +#define zeroize mbedtls_platform_zeroize /* * Helpers to test constant-time behaviour with valgrind or MemSan.