CURLOPT_PROXY_CRLFILE(3)
π NAME π
okay bestie, welcome to the CURLOPT_PROXY_CRLFILE(3) page from the Library Functions Manual β¨ This is the HTTPS proxy Certificate Revocation List file situation, and we're gonna make it make sense.
CURLOPT_PROXY_CRLFILE - HTTPS proxy Certificate Revocation List file π
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CRLFILE, char *file);
π DESCRIPTION π
okay so, first thing: this option is for connecting to an HTTPS proxy, not an HTTPS server. Like, proxy vibes only, no cap π«Ά
You pass a char * pointer to a null-terminated string naming a file with the concatenation of CRL (in PEM format) to use in the certificate validation that occurs during the SSL exchange. That's the whole assignment, bestie.
- When curl is built to use
GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. It's giving "we don't control that" energy, lowkey. - When libcurl is built with
OpenSSLsupport,X509_V_FLAG_CRL_CHECKandX509_V_FLAG_CRL_CHECK_ALLare both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed. - This option makes sense only when used in combination with the
CURLOPT_PROXY_SSL_VERIFYPEER(3)option. - A specific error code (
CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. - The application does not have to keep the string around after setting this option.
- Using this option multiple times makes the last set string override the previous ones. Set it to
NULLto disable its use again.
πΈ DEFAULT πΈ
NULL β that's it, that's the default β¨
π¦ PROTOCOLS π¦
This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. (yes, etc. is doing its little thing)
This option works only with the following TLS backends: GnuTLS, OpenSSL and mbedTLS π
π EXAMPLE π
Here's the example, exactly as it is, because we do not mess with code in this house:
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80");
curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem");
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
β AVAILABILITY β
Added in curl 7.52.0 β¨
π« RETURN VALUE π«
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).
π₯ SEE ALSO π₯
CURLOPT_PROXY_SSL_VERIFYHOST(3)CURLOPT_PROXY_SSL_VERIFYPEER(3)CURLOPT_SSL_VERIFYHOST(3)CURLOPT_SSL_VERIFYPEER(3)
xoxo bestie π this page is from libcurl, dated 2026-10-12, and the manual page is CURLOPT_PROXY_CRLFILE(3) β catch you in the next SSL exchange π
β¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms