Misc cleanup#104
Merged
danielinux merged 2 commits intowolfSSL:masterfrom Apr 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs small ESP-related cleanups to make error returns consistent, centralize IP-header fixups in the wrap path, and ensure ESP test binaries fail fast when required crypto support is not compiled in.
Changes:
- Normalize HMAC ICV check failure return to
-1instead of a non-zero compare value. - Move IPv4 header updates (len/proto/checksum) into
esp_transport_wrap()and remove duplicate fixups in unit tests / send path. - Update ESP integration tests to return an error when built without GCM-stream or DES3 support, and avoid initializing the stack if the selected mode cannot be supported.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/wolfesp.c |
Normalizes ICV mismatch return and refactors IP header updates into esp_transport_wrap() (removing duplication in esp_send()). |
src/test/unit/unit_esp.c |
Removes manual proto/len/checksum fixups that are now handled by esp_transport_wrap(). |
src/test/esp/test_esp.c |
Fails early with an error when selected ESP mode requires missing algorithm support; defers stack init until after SA setup succeeds. |
src/test/esp/esp_server.c |
Same “fail early if alg not built” behavior for the server test binary. |
Makefile |
Clarifies debug-flag comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
danielinux
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description