1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXY_CRLFILE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_PROXY_SSL_VERIFYHOST (3) 9 - CURLOPT_PROXY_SSL_VERIFYPEER (3) 10 - CURLOPT_SSL_VERIFYHOST (3) 11 - CURLOPT_SSL_VERIFYPEER (3) 12--- 13 14# NAME 15 16CURLOPT_PROXY_CRLFILE - HTTPS proxy Certificate Revocation List file 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CRLFILE, char *file); 24~~~ 25 26# DESCRIPTION 27 28This option is for connecting to an HTTPS proxy, not an HTTPS server. 29 30Pass a char pointer to a null-terminated string naming a *file* with the 31concatenation of CRL (in PEM format) to use in the certificate validation that 32occurs during the SSL exchange. 33 34When curl is built to use GnuTLS, there is no way to influence the use of CRL 35passed to help in the verification process. When libcurl is built with OpenSSL 36support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, 37requiring CRL check against all the elements of the certificate chain if a CRL 38file is passed. 39 40This option makes sense only when used in combination with the 41CURLOPT_PROXY_SSL_VERIFYPEER(3) option. 42 43A specific error code (*CURLE_SSL_CRL_BADFILE*) is defined with the option. It 44is returned when the SSL exchange fails because the CRL file cannot be loaded. 45A failure in certificate verification due to a revocation information found in 46the CRL does not trigger this specific error. 47 48The application does not have to keep the string around after setting this 49option. 50 51# DEFAULT 52 53NULL 54 55# PROTOCOLS 56 57Used with HTTPS proxy. 58 59# EXAMPLE 60 61~~~c 62int main(void) 63{ 64 CURL *curl = curl_easy_init(); 65 if(curl) { 66 CURLcode res; 67 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 68 curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80"); 69 curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem"); 70 res = curl_easy_perform(curl); 71 curl_easy_cleanup(curl); 72 } 73} 74~~~ 75 76# AVAILABILITY 77 78Added in 7.52.0 79 80# RETURN VALUE 81 82Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 83CURLE_OUT_OF_MEMORY if there was insufficient heap space. 84