Add flow montitor to the mbedtls_platform_memset()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
diff --git a/include/mbedtls/platform_util.h b/include/mbedtls/platform_util.h
index 8d00eba..1f45b1c 100644
--- a/include/mbedtls/platform_util.h
+++ b/include/mbedtls/platform_util.h
@@ -161,8 +161,11 @@
* \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 @@
* \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 );