Repository navigation
Conversation
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.
bagder
approved these changes
Oct 16, 2026
There was a problem hiding this comment.
🟡 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
kSecRevocationRequirePositiveResponsewhenverifystatusis set. - Removes the disabled
revoke_best_effortpolicy 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.
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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