From 888379e5131c34278c26c4696918a6cdcebc886b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Thu, 7 Jun 2018 16:25:01 +0200 Subject: Bump mbedTLS to version 2.10.0 --- thirdparty/mbedtls/library/pk.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'thirdparty/mbedtls/library/pk.c') diff --git a/thirdparty/mbedtls/library/pk.c b/thirdparty/mbedtls/library/pk.c index b52c73fbc6..f05b139e3f 100644 --- a/thirdparty/mbedtls/library/pk.c +++ b/thirdparty/mbedtls/library/pk.c @@ -29,6 +29,8 @@ #include "mbedtls/pk.h" #include "mbedtls/pk_internal.h" +#include "mbedtls/platform_util.h" + #if defined(MBEDTLS_RSA_C) #include "mbedtls/rsa.h" #endif @@ -42,11 +44,6 @@ #include #include -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - /* * Initialise a mbedtls_pk_context */ @@ -69,7 +66,7 @@ void mbedtls_pk_free( mbedtls_pk_context *ctx ) ctx->pk_info->ctx_free_func( ctx->pk_ctx ); - mbedtls_zeroize( ctx, sizeof( mbedtls_pk_context ) ); + mbedtls_platform_zeroize( ctx, sizeof( mbedtls_pk_context ) ); } /* -- cgit v1.2.3