1
0
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:
Dave Rodgman
2023-08-03 12:56:21 +00:00
committed by GitHub
24 changed files with 90 additions and 141 deletions

View File

@@ -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