Skip to content

Fix md context leak on repeated ShaCtx/HmacCtx begin#2

Merged
zekageri merged 1 commit intomainfrom
feature/espcrypto-mdctx-leak-fix
Feb 25, 2026
Merged

Fix md context leak on repeated ShaCtx/HmacCtx begin#2
zekageri merged 1 commit intomainfrom
feature/espcrypto-mdctx-leak-fix

Conversation

@zekageri
Copy link
Collaborator

Summary:

  • free and re-init mbedtls md context at the start of ShaCtx::begin and HmacCtx::begin
  • reset started/info before setup so reused streaming contexts start clean
  • add regression tests that re-begin the same ShaCtx and HmacCtx instance and verify outputs

Validation:

  • pio test -e esp32dev (fails in this environment: pio not found)

@zekageri zekageri merged commit 99c62f9 into main Feb 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant