summaryrefslogtreecommitdiff
path: root/thirdparty/mbedtls/library/platform.c
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-07-10 15:04:16 +0200
committerGitHub <noreply@github.com>2018-07-10 15:04:16 +0200
commit27b70914e409b0bdbf4ace17e7929a5537542c58 (patch)
tree7506b8fdb142bb6a99182ee0fd00bbdbb2b36d34 /thirdparty/mbedtls/library/platform.c
parent04d9f8dbd6b1ec517c2d66db19efa93517933232 (diff)
parent888379e5131c34278c26c4696918a6cdcebc886b (diff)
Merge pull request #19422 from Faless/mbedtls_2.10
Bump mbedTLS to version 2.10.0
Diffstat (limited to 'thirdparty/mbedtls/library/platform.c')
-rw-r--r--thirdparty/mbedtls/library/platform.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/thirdparty/mbedtls/library/platform.c b/thirdparty/mbedtls/library/platform.c
index a295f9b9af..9e992875d9 100644
--- a/thirdparty/mbedtls/library/platform.c
+++ b/thirdparty/mbedtls/library/platform.c
@@ -28,14 +28,7 @@
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
-
-#if defined(MBEDTLS_ENTROPY_NV_SEED) && \
- !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO)
-/* Implementation that should never be optimized out by the compiler */
-static void mbedtls_zeroize( void *v, size_t n ) {
- volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0;
-}
-#endif
+#include "mbedtls/platform_util.h"
#if defined(MBEDTLS_PLATFORM_MEMORY)
#if !defined(MBEDTLS_PLATFORM_STD_CALLOC)
@@ -241,7 +234,7 @@ int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len )
if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len )
{
fclose( file );
- mbedtls_zeroize( buf, buf_len );
+ mbedtls_platform_zeroize( buf, buf_len );
return( -1 );
}