Skip to content

Keycache test fixes #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2025
Merged

Keycache test fixes #125

merged 2 commits into from
Jun 27, 2025

Conversation

bigbrett
Copy link
Contributor

Fixes use of uninitialized variable as buffer size in/out argument, which caused sporadic test failures on hardware platforms

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR stabilizes key cache tests by fixing uninitialized buffer-size usage, unifying key ID initialization, and improving cleanup logic to avoid sporadic failures.

  • Initialize keyId to a defined erased constant rather than arbitrary literals
  • Set exportedKeySize before each export call to ensure correct buffer length
  • Refine eviction cleanup to handle both success and error paths and update error messages
Comments suppressed due to low confidence (1)

test/wh_test_crypto.c:972

  • [nitpick] The message "after cache" may be confusing—consider "after caching key" or "after cache operation" for clarity on where it failed.
                    WH_ERROR_PRINT("Failed to export key after cache: %d\n",

@billphipps billphipps merged commit 9eed8bd into wolfSSL:main Jun 27, 2025
5 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.

2 participants