Add flow montitor to the mbedtls_platform_memset()

Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
This commit is contained in:
Piotr Nowicki 2020-06-23 12:59:56 +02:00
parent 2bb1376560
commit ed840dbcd8
2 changed files with 59 additions and 17 deletions

View file

@ -161,8 +161,11 @@ MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t;
* \param buf Buffer to be zeroized
* \param len Length of the buffer in bytes
*
* \return The value of \p buf if the operation was successful.
* \return NULL if a potential FI attack was detected or input parameters
* are not valid.
*/
void mbedtls_platform_zeroize( void *buf, size_t len );
void *mbedtls_platform_zeroize( void *buf, size_t len );
/**
* \brief Secure memset
@ -176,7 +179,8 @@ void mbedtls_platform_zeroize( void *buf, size_t len );
* \param value Value to be used when setting the buffer.
* \param num The length of the buffer in bytes.
*
* \return The value of \p ptr.
* \return The value of \p ptr if the operation was successful.
* \return NULL if a potential FI attack was detected.
*/
void *mbedtls_platform_memset( void *ptr, int value, size_t num );