Skip to content

Keycache test fixes#125

Merged
billphipps merged 2 commits into
wolfSSL:mainfrom
bigbrett:keycache-test-fixes
Jun 27, 2025
Merged

Keycache test fixes#125
billphipps merged 2 commits into
wolfSSL:mainfrom
bigbrett:keycache-test-fixes

Conversation

@bigbrett

Copy link
Copy Markdown
Contributor

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

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.

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",

Comment thread test/wh_test_crypto.c
Comment thread test/wh_test_crypto.c
Comment thread test/wh_test_crypto.c
@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.

3 participants