Use plain memset() in context init functions
We call xxx_init() on a structure when it has been freshly allocated (on the
stack or heap).
At this point it contains random-looking data none of which should be
sensitive, as all sensitive data is wiped using mbedtls_platform_zeroize()
when we're done using it and the memory area is going to be reclaimed (by
exiting the function or free()ing the buffer).
diff --git a/library/pk.c b/library/pk.c
index a2d86e1..688a1fc 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -1291,7 +1291,7 @@
ctx->pk_info = MBEDTLS_PK_INVALID_HANDLE;
ctx->pk_ctx = NULL;
#else
- mbedtls_platform_zeroize( ctx, sizeof( mbedtls_pk_context ) );
+ memset( ctx, 0, sizeof( mbedtls_pk_context ) );
#endif
}