← Commit list

4433f71d6c

Stefan Eissing
Stefan Eissing
2026-08-27
SUCCESS Duration: 427s

Subject

macos sectrust: fail ocsp verify when not builtin

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/apple.c+10 -5
@@ -200,8 +200,9 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
goto out;
}
-#if defined(HAVE_BUILTIN_AVAILABLE) && defined(SUPPORTS_SecOCSP)
if(ocsp_len > 0) {
+ bool checked = FALSE;
+#if defined(HAVE_BUILTIN_AVAILABLE) && defined(SUPPORTS_SecOCSP)
if(__builtin_available(macOS 10.9, iOS 7, tvOS 9, watchOS 2, *)) {
CFDataRef ocspdata = CFDataCreate(NULL, ocsp_buf, (CFIndex)ocsp_len);
@@ -213,12 +214,16 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
result = CURLE_PEER_FAILED_VERIFICATION;
goto out;
}
+ checked = TRUE;
}
- }
-#else
- (void)ocsp_buf;
- (void)ocsp_len;
#endif
+ if(!checked) {
+ (void)ocsp_buf;
+ failf(data, "Apple SecTrust: OCSP verification not supported");
+ result = CURLE_NOT_BUILT_IN;
+ goto out;
+ }
+ }
#ifdef SUPPORTS_SecTrustEvaluateWithError
#ifdef HAVE_BUILTIN_AVAILABLE