setopt: fix to honor CURLOPT_PROXY_CAINFO_BLOB over Native CA

In AppleSecTrust or NativeCA-enabled builds, make sure override it when
setting a custom `CURLOPT_PROXY_CAINFO_BLOB`.

Reported-by: Joshua Rogers (Aisle Research)

Follow-up to 1730407b74 #18279
Follow-up to eefd03c572 #18703

Closes #21631
This commit is contained in:
Viktor Szakats 2026-05-15 14:33:07 +02:00
parent 3f8f725d97
commit c46a7913e5
No known key found for this signature in database

View file

@ -2842,8 +2842,10 @@ static CURLcode setopt_blob(struct Curl_easy *data, CURLoption option,
* Specify entire PEM of the CA certificate
*/
#ifdef USE_SSL
if(Curl_ssl_supports(data, SSLSUPP_CAINFO_BLOB))
if(Curl_ssl_supports(data, SSLSUPP_CAINFO_BLOB)) {
s->proxy_ssl.custom_cablob = TRUE;
return Curl_setblobopt(&s->blobs[BLOB_CAINFO_PROXY], blob);
}
#endif
return CURLE_NOT_BUILT_IN;
case CURLOPT_PROXY_ISSUERCERT_BLOB: