Zeroising of plaintext buffers to erase unused application data from memory
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
parent
3a1944a187
commit
3eaa10389d
2 changed files with 8 additions and 0 deletions
library
|
@ -8569,6 +8569,10 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
|
|||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue