Skip to content

Guard OCSP signature params with WC_RSA_PSS ifdef#10150

Open
julek-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
julek-wolfssl:enable-ocsp-responder-disable-tls13
Open

Guard OCSP signature params with WC_RSA_PSS ifdef#10150
julek-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
julek-wolfssl:enable-ocsp-responder-disable-tls13

Conversation

@julek-wolfssl
Copy link
Copy Markdown
Member

OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS is only defined when WC_RSA_PSS
is enabled but was used unconditionally in EncodeBasicOcspResponse,
causing a build error when WC_RSA_PSS is not defined.

OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS is only defined when WC_RSA_PSS
is enabled but was used unconditionally in EncodeBasicOcspResponse,
causing a build error when WC_RSA_PSS is not defined.
Copilot AI review requested due to automatic review settings April 7, 2026 15:31
@julek-wolfssl julek-wolfssl self-assigned this Apr 7, 2026
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

Note

Copilot was unable to run its full agentic suite in this review.

Fixes a conditional-compilation build break in OCSP basic response encoding when WC_RSA_PSS is disabled by guarding usage of OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS.

Changes:

  • Wraps signature-parameter ASN.1 encoding in EncodeBasicOcspResponse() with #ifdef WC_RSA_PSS.
Comments suppressed due to low confidence (3)

wolfcrypt/src/asn.c:1

  • When WC_RSA_PSS is not enabled, this change will silently omit encoding sigParams even if the caller provides them (or if the signature OID implies RSA-PSS). That can produce a non-compliant AlgorithmIdentifier for RSA-PSS (parameters are required by spec) and make the encoded OCSP response unverifiable by strict parsers. Consider adding an #else path that returns a clear error (e.g., “not compiled in”) when resp->sigParams is set (or when resp->sigOID indicates PSS) so misconfiguration fails fast rather than emitting subtly invalid ASN.1.
    wolfcrypt/src/asn.c:1
  • Preprocessor directives are typically aligned to the start of the line in this file style (no indentation). Using #ifdef/#endif at column 1 improves readability and reduces the chance of inconsistent formatting in future edits.
    wolfcrypt/src/asn.c:1
  • Preprocessor directives are typically aligned to the start of the line in this file style (no indentation). Using #ifdef/#endif at column 1 improves readability and reduces the chance of inconsistent formatting in future edits.

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

@julek-wolfssl
Copy link
Copy Markdown
Member Author

retest this please history lost

@julek-wolfssl
Copy link
Copy Markdown
Member Author

Failures not related to PR

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.

3 participants