mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Merge pull request #7933 from tom-cosgrove-arm/add-mbedtls_zeroize_and_free
Provide and use internal function mbedtls_zeroize_and_free()
This commit is contained in:
@@ -319,9 +319,8 @@ void mbedtls_md_free(mbedtls_md_context_t *ctx)
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
if (ctx->hmac_ctx != NULL) {
|
||||
mbedtls_platform_zeroize(ctx->hmac_ctx,
|
||||
mbedtls_zeroize_and_free(ctx->hmac_ctx,
|
||||
2 * ctx->md_info->block_size);
|
||||
mbedtls_free(ctx->hmac_ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user