Zeroising of plaintext buffers to erase unused application data from memory

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 02b8f26..c7787cb 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -8569,6 +8569,10 @@
     memcpy( buf, ssl->in_offt, n );
     ssl->in_msglen -= n;
 
+    /* Zeroising the plaintext buffer to erase unused application data
+       from the memory. */
+    mbedtls_platform_zeroize( ssl->in_offt, n );
+
     if( ssl->in_msglen == 0 )
     {
         /* all bytes consumed */