Skip to content

apple sectrust: require OCSP for cert-status - #23430

Closed
icing wants to merge 4 commits into
curl:masterfrom
icing:sectrust-verifystatus-fix
Closed

icing wants to merge 4 commits into
curl:masterfrom
icing:sectrust-verifystatus-fix

Conversation

@icing

@icing icing commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

When OCSP stapling is required for a transfer (e.g. --cert-status), pass kSecRevocationRequirePositiveResponse to Apple sectrust (when curl is built with it and it applies). This assures that verification by sectrust fails on a missing/invalid OCSP response.

When OCSP stapling is required for a transfer (e.g. --cert-status),
pass `kSecRevocationRequirePositiveResponse` to Apple sectrust
(when curl is built with it and it applies). This assures that
verification by sectrust fails on a missing/invalid OCSP response.
@github-actions github-actions Bot added TLS appleOS specific to an Apple operating system labels Oct 16, 2026

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

GnuTLS does not forward stapled responses to SecTrust, so the stricter policy can reject valid connections when other revocation data is unavailable.

1 open finding
What changed in this PR

Tightens Apple SecTrust revocation verification when certificate-status checking is requested.

Changes:

  • Enables kSecRevocationRequirePositiveResponse when verifystatus is set.
  • Removes the disabled revoke_best_effort policy block and its explanatory comment.
File Description
lib/​vtls/​apple.c Requires positive revocation confirmation for certificate-status checks.

🧠 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/apple.c Resolved
icing added 3 commits October 16, 2026 12:27
- add `ocsp_required` parameter to `Curl_vtls_apple_verify()`
- check apple verify error for ocsp failures and return
  CURLE_SSL_INVALIDCERTSTATUS in such a case
- failf() a verfication with the Apple error description
  which is better for analysis
- set TRUE in openssl.c when ocsp response needs to be there
  and valid
- set FALSE in gtls.c where we validate OCSP separately
function to trigger "manual" OCSP check when SecTrust cannot.
@icing
icing requested a review from bagder October 16, 2026 11:28
@bagder bagder closed this in cd89b51 Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

appleOS specific to an Apple operating system TLS

Development

Successfully merging this pull request may close these issues.

3 participants