Provide and use internal function mbedtls_zeroize_and_free()
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
b366fe955d
commit
ca8c61b815
23 changed files with 83 additions and 127 deletions
|
@ -129,6 +129,15 @@ void mbedtls_platform_zeroize(void *buf, size_t len)
|
|||
}
|
||||
#endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */
|
||||
|
||||
void mbedtls_zeroize_and_free(void *buf, size_t len)
|
||||
{
|
||||
if (buf != NULL) {
|
||||
mbedtls_platform_zeroize(buf, len);
|
||||
}
|
||||
|
||||
mbedtls_free(buf);
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT)
|
||||
#include <time.h>
|
||||
#if !defined(_WIN32) && (defined(unix) || \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue