CURLOPT_PROXY_CRLFILE.3 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_CRLFILE.md
  2. .TH CURLOPT_PROXY_CRLFILE 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_CRLFILE \- HTTPS proxy Certificate Revocation List file
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CRLFILE, char *file);
  9. .fi
  10. .SH DESCRIPTION
  11. This option is for connecting to an HTTPS proxy, not an HTTPS server.
  12. Pass a char pointer to a null\-terminated string naming a \fIfile\fP with the
  13. concatenation of CRL (in PEM format) to use in the certificate validation that
  14. occurs during the SSL exchange.
  15. When curl is built to use GnuTLS, there is no way to influence the use of CRL
  16. passed to help in the verification process. When libcurl is built with OpenSSL
  17. support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set,
  18. requiring CRL check against all the elements of the certificate chain if a CRL
  19. file is passed.
  20. This option makes sense only when used in combination with the
  21. \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP option.
  22. A specific error code (\fICURLE_SSL_CRL_BADFILE\fP) is defined with the option. It
  23. is returned when the SSL exchange fails because the CRL file cannot be loaded.
  24. A failure in certificate verification due to a revocation information found in
  25. the CRL does not trigger this specific error.
  26. The application does not have to keep the string around after setting this
  27. option.
  28. .SH DEFAULT
  29. NULL
  30. .SH PROTOCOLS
  31. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  32. This option works only with the following TLS backends:
  33. GnuTLS, OpenSSL and mbedTLS
  34. .SH EXAMPLE
  35. .nf
  36. int main(void)
  37. {
  38. CURL *curl = curl_easy_init();
  39. if(curl) {
  40. CURLcode res;
  41. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  42. curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80");
  43. curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem");
  44. res = curl_easy_perform(curl);
  45. curl_easy_cleanup(curl);
  46. }
  47. }
  48. .fi
  49. .SH AVAILABILITY
  50. Added in curl 7.52.0
  51. .SH RETURN VALUE
  52. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  53. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  54. .SH SEE ALSO
  55. .BR CURLOPT_PROXY_SSL_VERIFYHOST (3),
  56. .BR CURLOPT_PROXY_SSL_VERIFYPEER (3),
  57. .BR CURLOPT_SSL_VERIFYHOST (3),
  58. .BR CURLOPT_SSL_VERIFYPEER (3)