Skip to content

Reject status_request_v2 ocsp-multi staples that bundle multiple SingleResponses#10747

Open
gasbytes wants to merge 1 commit into
wolfSSL:masterfrom
gasbytes:tls-1-2-ocsp-multi-stapl-check
Open

Reject status_request_v2 ocsp-multi staples that bundle multiple SingleResponses#10747
gasbytes wants to merge 1 commit into
wolfSSL:masterfrom
gasbytes:tls-1-2-ocsp-multi-stapl-check

Conversation

@gasbytes

@gasbytes gasbytes commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Reject status_request_v2 ocsp-multi staples that bundle multiple SingleResponses
So a revoked certificate's non-first single can no longer be accepted

Testing

Added regression test + generated blob with the certificate chain to reproduce the behaviour.
config used: ./configure --enable-all

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gasbytes gasbytes force-pushed the tls-1-2-ocsp-multi-stapl-check branch 2 times, most recently from a1db565 to 1410138 Compare June 22, 2026 15:37
@gasbytes gasbytes self-assigned this Jun 22, 2026
@julek-wolfssl julek-wolfssl requested a review from Copilot June 22, 2026 15:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardens OCSP stapling verification for status_request_v2 OCSP-multi by rejecting stapled BasicOCSPResponse values that bundle multiple SingleResponse entries, closing a case where a revoked certificate could be accepted if a benign SingleResponse appeared first.

Changes:

  • Reject OCSP-multi (WOLFSSL_CSR2_OCSP_MULTI) staples that contain more than one SingleResponse.
  • Add a regression test that staples a multi-SingleResponse leaf OCSP response where the revoked entry is not first.
  • Add a generated OCSP response blob and generator script entry to reproduce the behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/internal.c Adds a guard in DoCertificateStatus() to reject multi-SingleResponse staples for CSR2 OCSP-multi.
tests/api/test_ocsp.c Adds a regression test and status callback that supplies the crafted multi-SingleResponse leaf staple.
tests/api/test_ocsp.h Exposes the new regression test prototype.
tests/api.c Registers the new test in the test runner.
tests/api/test_ocsp_test_blobs.h Adds the new binary OCSP response blob used by the test.
tests/api/create_ocsp_test_blobs.py Adds generation metadata for the new OCSP response blob.

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

Comment thread tests/api/test_ocsp.c Outdated
@gasbytes gasbytes force-pushed the tls-1-2-ocsp-multi-stapl-check branch from 1410138 to 7c287de Compare June 22, 2026 15:55
@gasbytes gasbytes marked this pull request as ready for review June 22, 2026 16:03
@github-actions

Copy link
Copy Markdown

retest this please

@gasbytes gasbytes assigned julek-wolfssl and unassigned gasbytes Jun 22, 2026
@gasbytes gasbytes requested a review from julek-wolfssl June 22, 2026 17:13
Comment thread src/internal.c Outdated
…leResponses

So a revoked certificate's non-first single can no longer be accepted
@gasbytes gasbytes force-pushed the tls-1-2-ocsp-multi-stapl-check branch from 7c287de to 733d292 Compare June 23, 2026 09:41
@gasbytes gasbytes requested a review from julek-wolfssl June 23, 2026 10:36
@gasbytes gasbytes assigned julek-wolfssl and unassigned gasbytes Jun 23, 2026
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