Skip to content

F-644: fix read of exactly MAX_LEN bytes treated as error#214

Merged
dgarske merged 3 commits intowolfSSL:mainfrom
miyazakh:f-644_readofMAXLEN
Apr 10, 2026
Merged

F-644: fix read of exactly MAX_LEN bytes treated as error#214
dgarske merged 3 commits intowolfSSL:mainfrom
miyazakh:f-644_readofMAXLEN

Conversation

@miyazakh
Copy link
Copy Markdown
Contributor

@miyazakh miyazakh commented Mar 27, 2026

Fix "Successful read of exactly MAX_LEN bytes treated as error"
Add test coverage

Depend on : #211 (Fixed)
Depend on : #219

Copilot AI review requested due to automatic review settings March 27, 2026 05:22
Copy link
Copy Markdown

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

Fixes a decryption regression in the non-EVP crypto path where a successful XFREAD() returning exactly MAX_LEN bytes was incorrectly treated as an error, and extends shell test coverage to catch the boundary condition.

Changes:

  • Adjust wolfCLU_decrypt() to treat any positive-length XFREAD() result (including exactly MAX_LEN) as success.
  • Add an encrypt/decrypt round-trip test (Camellia, non-EVP path) that exercises multi-chunk reads.
  • Broaden OCSP interop test log matching for “invalid file” error text across implementations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/ocsp/ocsp-interop-test.sh Expands expected error-message pattern matching for invalid certificate file test.
tests/encrypt/enc-test.sh Adds Camellia round-trip test intended to exercise MAX_LEN read boundary behavior in non-EVP decrypt path.
src/x509/clu_x509_sign.c Updates preprocessor gating for additional hash enum cases; whitespace-only adjustments nearby.
src/crypto/clu_decrypt.c Fixes handling of XFREAD() returning exactly MAX_LEN bytes so it is not treated as failure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@miyazakh miyazakh self-assigned this Mar 27, 2026
@miyazakh miyazakh force-pushed the f-644_readofMAXLEN branch from 7e1ae69 to 764da36 Compare April 7, 2026 21:12
@miyazakh miyazakh marked this pull request as ready for review April 7, 2026 21:13
Copilot AI review requested due to automatic review settings April 7, 2026 21:13
Copy link
Copy Markdown

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@miyazakh miyazakh force-pushed the f-644_readofMAXLEN branch from 764da36 to 7f91683 Compare April 9, 2026 01:00
@miyazakh miyazakh assigned wolfSSL-Bot and unassigned miyazakh Apr 9, 2026
@dgarske dgarske merged commit a176670 into wolfSSL:main Apr 10, 2026
17 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.

4 participants