1CURLOPT_CRLFILE(3) curl_easy_setopt options CURLOPT_CRLFILE(3)
2
3
4
6 CURLOPT_CRLFILE - specify a Certificate Revocation List file
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLFILE, char *file);
12
14 Pass a char * to a zero terminated string naming a file with the con‐
15 catenation of CRL (in PEM format) to use in the certificate validation
16 that occurs during the SSL exchange.
17
18 When curl is built to use NSS or GnuTLS, there is no way to influence
19 the use of CRL passed to help in the verification process. When libcurl
20 is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and
21 X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all
22 the elements of the certificate chain if a CRL file is passed.
23
24 This option makes sense only when used in combination with the CUR‐
25 LOPT_SSL_VERIFYPEER(3) option.
26
27 A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the
28 option. It is returned when the SSL exchange fails because the CRL file
29 cannot be loaded. A failure in certificate verification due to a revo‐
30 cation information found in the CRL does not trigger this specific
31 error.
32
33 The application does not have to keep the string around after setting
34 this option.
35
37 NULL
38
40 All TLS-based protocols
41
43 CURL *curl = curl_easy_init();
44 if(curl) {
45 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
46 curl_easy_setopt(curl, CURLOPT_CRLFILE, "/etc/certs/crl.pem");
47 ret = curl_easy_perform(curl);
48 curl_easy_cleanup(curl);
49 }
50
52 Added in 7.19.0
53
55 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
56 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
57
59 CURLOPT_SSL_VERIFYPEER(3), CURLOPT_SSL_VERIFYHOST(3), CUR‐
60 LOPT_PROXY_CRLFILE(3),
61
62
63
64libcurl 7.64.0 May 31, 2017 CURLOPT_CRLFILE(3)