Skip to content

cert-status, tests and fixes - #23420

Closed
icing wants to merge 6 commits into
curl:masterfrom
icing:gtls-verifystatus-good
Closed

icing wants to merge 6 commits into
curl:masterfrom
icing:gtls-verifystatus-good

Conversation

@icing

@icing icing commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Add test_24 for checking OCSP stapling responses for a test certificate delivered via openssl s_server.

  • fix gnutls edge cases that escape the default verification implemented by gnuTLS itself
  • openssl: use the "verified cert chain" and not the "peer chain" to check OCSP trust. The difference is that the former includes the anchor certificate. For public certificates this will mostly not matter as OCSP is rarely signed by a root cert, but for private CAs this might happen.

Add test_24 for checking OCSP stapling responses for a test
certificate delivered via `openssl s_server`.

- fix gnutls edge cases that escape the default verification
  implemented by gnuTLS itself
- openssl: use the "verified cert chain" and not the "peer chain"
  to check OCSP trust. The difference is that the former includes
  the anchor certificate. For public certificates this will mostly
  not matter as OCSP is rarely signed by a root cert, but for
  private CAs this might happen.
@github-actions github-actions Bot added the tests label Oct 15, 2026
@icing
icing requested a review from bagder October 15, 2026 16:19
@matty69v

Copy link
Copy Markdown
Contributor

@icing matty69v from Hackerone i retested with the latest fixes that's now good !

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Older LibreSSL compatibility, server-startup synchronization, and test capability gates need correction.

4 open findings
What changed in this PR

Strengthens OCSP stapling verification in curl’s TLS backends and adds HTTP regression tests using openssl s_server.

Changes:

  • Adds tests for missing, unsuccessful, unknown, revoked, and valid OCSP responses.
  • Expands GnuTLS response validation.
  • Uses OpenSSL’s verified certificate chain for OCSP trust checks.
File Description
tests/​http/​testenv/​certs.py Exposes certificate serial numbers for OCSP fixtures.
tests/​http/​test_24_ocsp.py Adds OCSP server fixtures and regression cases.
tests/​http/​Makefile.am Includes the new test in distributions.
lib/​vtls/​openssl.c Switches OCSP verification to the verified chain.
lib/​vtls/​gtls.c Validates OCSP response and peer-certificate status.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/vtls/openssl.c Resolved
Comment thread tests/http/test_24_ocsp.py Resolved
Comment thread tests/http/test_24_ocsp.py Resolved
Comment thread tests/http/test_24_ocsp.py Resolved
- cope with old libressl versions
- skip test on better precondition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants