aboutsummaryrefslogtreecommitdiff
path: root/3rdparty
diff options
context:
space:
mode:
authorGilles Peskine <Gilles.Peskine@arm.com>2023-09-06 19:42:35 +0200
committerGilles Peskine <Gilles.Peskine@arm.com>2023-09-06 19:42:35 +0200
commit8cae2c2eb56d82589d39898e62fe876a0e48ec31 (patch)
tree7e1a233aa590ea5b663ff24ae667ecf4ee67cadd /3rdparty
parent6147511bc00d409ba350d5741ca6d4c6bd369239 (diff)
downloadmbedtls-8cae2c2eb56d82589d39898e62fe876a0e48ec31.zip
mbedtls-8cae2c2eb56d82589d39898e62fe876a0e48ec31.tar.gz
mbedtls-8cae2c2eb56d82589d39898e62fe876a0e48ec31.tar.bz2
Use the zeroize function from Mbed TLS
Keep using the upstream name, to minimize the differences with the upstream code. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/p256-m/p256-m/p256-m.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/3rdparty/p256-m/p256-m/p256-m.c b/3rdparty/p256-m/p256-m/p256-m.c
index 21a021b..693cc6d 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 <stdio.h>
#include <stdlib.h>
@@ -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.