Skip to content

quickfix: add missing include to asn.h #8806

Closed
bigbrett wants to merge 1 commit intowolfSSL:masterfrom
bigbrett:asn-nomalloc-include-quickfix
Closed

quickfix: add missing include to asn.h #8806
bigbrett wants to merge 1 commit intowolfSSL:masterfrom
bigbrett:asn-nomalloc-include-quickfix

Conversation

@bigbrett
Copy link
Copy Markdown
Contributor

Description

Adds missing include to fix compiler errors in wolfBoot introduced when updating to the latest wolfSSL master. The wolfSSL upstream change that caused the error was introduced in #8725 - WC_MAX_DIGEST_SIZE is used to size a buffer in the no malloc case, but is defined in hash.h which was never included by asn.h.

Odd that our CI no malloc tests weren't able to catch this... I suspect it has something to do with using configure vs the wolfBoot user settings and makefile?

Let me know if you think there is a better way to do it.

@bigbrett bigbrett requested a review from Copilot May 28, 2025 15:29
Copy link
Copy Markdown
Contributor

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 fixes a missing dependency in asn.h by including hash.h when building in no‐malloc mode to resolve compiler errors introduced by upstream changes.

  • Adds #include <wolfssl/wolfcrypt/hash.h> under WOLFSSL_NO_MALLOC
  • Ensures WC_MAX_DIGEST_SIZE is defined for the fixed‐size signature buffer
Comments suppressed due to low confidence (1)

wolfssl/wolfcrypt/asn.h:94

  • Consider adding or enabling a CI build configuration for WOLFSSL_NO_MALLOC to catch missing includes or compilation errors in no‐malloc mode automatically.
#ifdef WOLFSSL_NO_MALLOC

@bigbrett bigbrett changed the title quickfix: add missing include quickfix: add missing include to asn.h May 28, 2025
@bigbrett
Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

1 similar comment
@bigbrett
Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

@dgarske
Copy link
Copy Markdown
Contributor

dgarske commented May 28, 2025

@bigbrett this is already fixed in a refactor I did here: #8803
My PR 8803 is up for review but might take some time to get merged.

@bigbrett
Copy link
Copy Markdown
Contributor Author

@dgarske ah okay good to know thx. I was just trying to be proactive. I can go ahead and close this.

@bigbrett bigbrett closed this May 28, 2025
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