Skip to content

Add missing include in asn.h#10014

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
danielinux:fix-regression-missing-include
Mar 19, 2026
Merged

Add missing include in asn.h#10014
dgarske merged 1 commit intowolfSSL:masterfrom
danielinux:fix-regression-missing-include

Conversation

@danielinux
Copy link
Copy Markdown
Member

wolfssl/wolfcrypt/asn.h uses WC_SHA384_DIGEST_SIZE and WC_SHA512_DIGEST_SIZE, but did not include wolfssl/wolfcrypt/sha512.h directly. This relied on transitive include order and broke builds where asn.h is parsed before hash.h/sha512.h, such as hash.c with SHA-384 enabled.

Regression introduced in #9761

Copilot AI review requested due to automatic review settings March 19, 2026 15:37
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 build fragility in wolfssl/wolfcrypt/asn.h by adding a direct include for sha512.h when SHA-384 or SHA-512 is enabled, avoiding reliance on transitive include order.

Changes:

  • Add conditional inclusion of wolfssl/wolfcrypt/sha512.h under WOLFSSL_SHA384 or WOLFSSL_SHA512.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread wolfssl/wolfcrypt/asn.h
@dgarske dgarske merged commit 63f6f05 into wolfSSL:master Mar 19, 2026
471 of 477 checks passed
@dgarske
Copy link
Copy Markdown
Member

dgarske commented Mar 19, 2026

Merged early

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