Skip to content

Rust wrapper: sha: free before re-initializing SHA structs - #11503

Open
holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:f-8306
Open

holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:f-8306

Conversation

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor

Description

Rust wrapper: sha: free before re-initializing SHA structs

Fixes F-8306.

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@holtrop-wolfssl holtrop-wolfssl self-assigned this Sep 18, 2026
Copilot AI lite review requested due to automatic review settings September 18, 2026 18:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Updates the Rust SHA wrappers to release resources before re-initializing hashing contexts, preventing leaks when an instance is initialized more than once.

Changes:

  • Frees existing SHA and SHAKE state before each corresponding initialization call.
  • Applies the fix consistently across SHA-1, SHA-2, SHA-3, and SHAKE variants.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor Author

retest this please (ERROR: Build 'wolfSSL/PRB-fips-repo-and-harness-test-v3-part1' failed with result: FAILURE)

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.

3 participants