CURLOPT_PROXY_CAPATH.3 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .\" generated by cd2nroff 0.1 from CURLOPT_PROXY_CAPATH.md
  2. .TH CURLOPT_PROXY_CAPATH 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_PROXY_CAPATH \- directory holding HTTPS proxy CA certificates
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer to a null\-terminated string naming a directory holding
  12. multiple CA certificates to verify the HTTPS proxy with. If libcurl is built
  13. against OpenSSL, the certificate directory must be prepared using the OpenSSL
  14. \fBc_rehash\fP utility. This makes sense only when
  15. \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is enabled (which it is by default).
  16. The application does not have to keep the string around after setting this
  17. option.
  18. The default value for this can be figured out with \fICURLINFO_CAPATH(3)\fP.
  19. .SH DEFAULT
  20. NULL
  21. .SH PROTOCOLS
  22. This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  23. This option works only with the following TLS backends:
  24. GnuTLS, OpenSSL and mbedTLS
  25. .SH EXAMPLE
  26. .nf
  27. int main(void)
  28. {
  29. CURL *curl = curl_easy_init();
  30. if(curl) {
  31. CURLcode res;
  32. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  33. /* using an HTTPS proxy */
  34. curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  35. curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
  36. res = curl_easy_perform(curl);
  37. curl_easy_cleanup(curl);
  38. }
  39. }
  40. .fi
  41. .SH AVAILABILITY
  42. Added in curl 7.52.0
  43. .SH RETURN VALUE
  44. CURLE_OK if supported; or an error such as:
  45. CURLE_NOT_BUILT_IN \- Not supported by the SSL backend
  46. CURLE_UNKNOWN_OPTION
  47. CURLE_OUT_OF_MEMORY
  48. .SH SEE ALSO
  49. .BR CURLOPT_CAINFO (3),
  50. .BR CURLOPT_DEBUGFUNCTION (3),
  51. .BR CURLOPT_PROXY_CAINFO (3),
  52. .BR CURLOPT_PROXY_SSL_VERIFYHOST (3),
  53. .BR CURLOPT_STDERR (3)