From bb709d74830564281ffce2d8863700c3a1ccfd99 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 30 Nov 2017 11:57:26 +0100 Subject: [PATCH] Fix build without MBEDTLS_FS_IO Fix missing definition of mbedtls_zeroize when MBEDTLS_FS_IO is disabled in the configuration. Introduced by e2985323947112a75c7c512ad062aa94da24cdbe Merge remote-tracking branch 'upstream-public/pr/1113' into mbedtls-1.3 --- library/pkparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/pkparse.c b/library/pkparse.c index 6fb0dd50d..5786db744 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -61,12 +61,15 @@ #define polarssl_free free #endif -#if defined(POLARSSL_FS_IO) +#if defined(POLARSSL_FS_IO) || \ + defined(POLARSSL_PKCS12_C) || defined(POLARSSL_PKCS5_C) /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } +#endif +#if defined(POLARSSL_FS_IO) /* * Load all data from a file into a given buffer. */