Skip to content

Conversation

@gojimmypi
Copy link
Contributor

Properly assign IMAGE_HEADER_SIZE default value.

Fixes validations failures in image.c verify when IMAGE_HEADER_SIZE not defined and called from the test-lib app.

While working on #623 and adding matrix support for more combinations, I encountered an odd problem where the test-lib would fail to validate.

The root cause is this blanket assignment that uses a value of 256, regardless of actual sign/hash needs:

#ifndef IMAGE_HEADER_SIZE
#  define IMAGE_HEADER_SIZE 256
#endif

Most of the make and cmake builds probably set this. There was no logic for it in my Visual Studio builds.

Tested here:

https://github.com/gojimmypi/wolfBoot/actions/runs/19991079444

While here, I also added a check for multiple hash assignments with a hard compile-time fail.
(yes, I did this accidentally, no, it's not an intuitive error, lol)

@dgarske dgarske assigned danielinux and unassigned danielinux Dec 10, 2025
@danielinux danielinux merged commit 985e2f7 into wolfSSL:master Dec 12, 2025
380 of 386 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